The band gap of formamidinium lead iodide (FAPbI3) perovskites allows broader absorption of the solar spectrum relative to conventional methylammonium lead iodide (MAPbI3). Because the optoelectronic properties of perovskite films are closely related to film quality, deposition of dense and uniform films is crucial for fabricating high-performance perovskite solar cells (PSCs). We report an approach for depositing high-quality FAPbI3 films, involving FAPbI3 crystallization by the direct intramolecular exchange of dimethylsulfoxide (DMSO) molecules intercalated in PbI2 with formamidinium iodide. This process produces FAPbI3 films with (111)-preferred crystallographic orientation, large-grained dense microstructures, and flat surfaces without residual PbI2. Using films prepared by this technique, we fabricated FAPbI3-based PSCs with maximum power conversion efficiency greater than 20%.