Electrodialysis (ED) is a well-known electrochemical water desalination technology investigated since the 1950s. In an ED stack, desalination is driven by an applied voltage, which results in selective salt ion electromigration through alternating cation and anion exchange membranes. Transport of hydronium and hydroxide ions during water treatment, together with water dissociation, can lead to unfavorable product acidity or alkalinity, compromise the membrane charge, or enhance scaling. Conversely, pH deviations can also be leveraged to tune the speciation of weak acid/base electrolytes to enhance chlorine disinfectant efficiency, or facilitate electrostatic removal of contaminants with pH-dependent properties. Thus, it is important to understand the effect of varying feedwater salinity and other system parameters on spatial pH deviations in the vicinity of the membrane, and on the pH of the product water.In this work, we extend ED theory to include pH effects in a repeating unit operated in the underlimiting current regime. Different from the single ion exchange membrane repeating unit considered by Sonin and Probstein [1], which is not applicable for systems including pH effects, we solve the concentration profiles of both the salt and water ions in a full repeating unit comprised of a cation exchange membrane and anion exchange membrane pair. To the first time to our knowledge, our model domain encompasses the entire ED repeating unit without assuming prescribed stagnant layer thickness in which the water dissociation reaction occurs. We solve the Nernst-Planck and electroneutrality set of equations in the channels and non-ideal IEMs, following the approach utilized for capturing pH effects in membrane capacitive deionization [2,3] and reverse osmosis [4,5]. We presented results showing fundamental features, including the concentration and pH distribution in the diluate channel, local flux density across the IEMs, and effluent salinity and pH. Our model predicts that including or excluding pH effects lead to essentially identical predictions for salt fluxes across the IEMs, and thus previous models neglecting pH effects are likely accurately predicting desalination. We also show that reducing salinity augments pH perturbations, but that the effluent pH, which consists of mixed acid and alkaline boundary layers at the diluate channel outlet, does not deviate from inlet neutral pH significantly. In the future, this model framework here can be extended to include multi-ionic solution and species with pH-dependent properties, and validated with a dedicated set of experimental results.