Tin oxide has made a major breakthrough in high-efficiency perovskite solar cells (PSCs) as an efficient electron transport layer by the low-temperature chemical bath deposition method. However, tin oxide often contains pernicious defects, resulting in unsatisfactory performance. Herein, we develop high-quality tin oxide films via a nitrogen-doping strategy for high-efficiency and stable planar PSCs. The aligned energy level at the interface of doped SnO2/perovskite, more excellent charge extraction and reduced nonradiative recombination contribute to the enhanced efficiency and stability. Correspondingly, the power conversion efficiency of the devices based on N-SnO2 film increases to 23.41% from 20.55% of the devices based on the pristine SnO2. The N-SnO2 devices show an outstanding stability retaining 97.8% of the initial efficiency after steady-state output at a maximum power point for 600 s under standard AM1.5G continuous illumination without encapsulation, while less than 50% efficiency remains for the devices based on pristine SnO2. This simple scalable strategy has shown great promise toward highly efficient and stable PSCs.