The main purpose of a compact TiO2 film as a vital part of the electron transport layer in perovskite solar cells (PSCs) is to minimize electron–hole recombination on the surface of F-doped SnO2 (FTO) and enhance the photoelectric property. By controlling concentrations and using different depressors, an excellent compact TiO2 film is prepared by sol–gel method. This research utilized four depressors (nitric acid, acetic acid, diethanolamine and acetylacetone) and their volume ratios to ethanol are 0, 1:1 and 1:2 to synthesize the TiO2 precursor sol. The surface morphology, ingredient and microstructure as well as the optical and electrochemical properties of PSC devices based on them are investigated by scanning electron microscopy (SEM), X-ray diffraction (XRD) and UV–visible absorption spectroscopy (UV–Vis), respectively. It is found that the device exhibited the most outstanding power conversion efficiency (PCE) of 14.92% via using diethanolamine as the depressor diluted in absolute ethanol in a proportion of 1:1 by volume. Further study showed that the enhanced PCE could be mainly ascribed to the increase of short-current density ([Formula: see text].