The pH of the solution used to produce an electro-polymerized polypyrrole (PPy) film has a significant impact on the morphology and properties of the resulting film and, by extension, on the electrocatalytic activity of the film for the I-/I(3)(_)(-)redox reaction. Accordingly, the performance of dye-sensitized solar cells (DSSCs) based on PPy counter electrodes (CEs) is affected by solution pH. In this study, p-toluene sulfonate ion-doped PPy (PPy-TsO) CEs on fluorine-doped tin oxide (FTO) glass substrates were fabricated using an electrochemical method under a constant bias in solutions with various pH values. The effect of the pH of the synthetic solution on the morphology, structure, and electrocatalytic activity during the I-/I-3(-) redox reaction of the obtained PPy CEs was thoroughly investigated by scanning electron microscopy (SEM), UV-Vis absorption spectroscopy, X-ray photoelectron spectroscopy (XPS), and cyclic voltammetry (CV). A pH value of 2.0 was found to represent the optimal value, since the PPy-TsO film produced at this pH exhibited the highest degree of doping, the longest conjugation length, and the highest catalytic activity. When working as the CE of a DSSC, this film also showed the highest power conversion efficiency. Films synthesized at pH values either above or below 2.0 exhibited inferior properties and lower performance when in DSSCs.