Vivianite mediating phosphate immobilization has been widely reported in natural environments and could be a promising measure for phosphorus recovery from sewage. This paper investigated the compatibility of vivianite crystallization in anaerobic sludge digesters at sewage treatment plants (STPs), where P in the sewage is concentrated, from a thermodynamic perspective and the effect of pH as a major influencing factor was studied. Vivianite crystallization under different conditions was performed by batch assays and in a continuous reactor as well. Chemical equilibriums and specification were evaluated by a MINTEQ 3.0 package, and the reaction products were analyzed by X-ray diffraction, microscopy and a laser diffraction particle size analyzer. The results show that the pKsp of vivianite was 39.8–40.7 at temperatures from 25 to 55 °C, and the temperature effect was insignificant. The metastable zone for vivianite was SI (supersaturated index) 0–11, but crystallization was greatly enhanced when SI was higher than 4. Effective crystallization of vivianite was observed at pH 7; the SI level at pH 6 was insufficient to trigger crystal nucleation and at pH 8 simple precipitation became dominant rather than crystallization. Adding quartz grains as seeds promoted vivianite crystallization by accelerating the reactions and lowering the supersaturation demand. In summary, this study demonstrated that vivianite pathway of phosphate recovery was thermodynamically compatible with P-rich anaerobic digestion systems. Because the forms of both phosphate and Fe(II) ions are pH-dependent, vivianite crystallization can be determinatively affected by the pH level of the system. Apparently, other physico-chemical and microbiological conditions, e.g., suspended solids, would also influence vivianite formation in the complex sludge mixture and warrants more research for process optimization.