As CsPbBr 3 has become a promising candidate for perovskite solar cells due to its stability, various strategies have been developed for its fabrication. However, the simplicity of fabrication and the film quality (integrity and homogeneity for large sizes) have become contradictory and difficult to reconcile. Herein, we propose an electrochemical route to fabricate CsPbBr 3 with electrochemistry and the assistance of the tetragonal phase NH 4 Pb 2 Br 5 , and as a result an efficiency of 4.96% has been achieved so far in the as-prepared solar cell. The intermediate NH 4 Pb 2 Br 5 can be obtained by in situ reaction of electrodeposited PbO 2 and an acidic ammonium bromide precursor. The content of perovskites and their electronic structures as well can be easily tuned by incorporating organic cations and halogen anions at the conversion stages and can realize conformal growth of perovskites on textured surfaces such as nanopyramids. This has indicated the good versatility of this method for different perovskites for varying applications.