Metal halide perovskite solar cells (PSCs) are an emerging photovoltaic technology with the potential to disrupt the mature silicon solar cell market. Great improvements in device performance over the past few years, thanks to the development of fabrication protocols(1-3), chemical compositions(4,5) and phase stabilization methods(6-10), have made PSCs one of the most efficient and low-cost solution-processable photovoltaic technologies. However, the light-harvesting performance of these devices is still limited by excessive charge carrier recombination. Despite much effort, the performance of the best-performing PSCs is capped by relatively low fill factors and high open-circuit voltage deficits (the radiative open-circuit voltage limit minus the high open-circuit voltage)(11). Improvements in charge carrier management, which is closely tied to the fill factor and the open-circuit voltage, thus provide a path towards increasing the device performance of PSCs, and reaching their theoretical efficiency limit(12). Here we report a holistic approach to improving the performance of PSCs through enhanced charge carrier management. First, we develop an electron transport layer with an ideal film coverage, thickness and composition by tuning the chemical bath deposition of tin dioxide (SnO2). Second, we decouple the passivation strategy between the bulk and the interface, leading to improved properties, while minimizing the bandgap penalty. In forward bias, our devices exhibit an electroluminescence external quantum efficiency of up to 17.2 per cent and an electroluminescence energy conversion efficiency of up to 21.6 per cent. As solar cells, they achieve a certified power conversion efficiency of 25.2 per cent, corresponding to 80.5 per cent of the thermodynamic limit of its bandgap. An improved device design for perovskite-based photovoltaic cells enables a certified power conversion efficiency of 25.2 per cent, translating to 80.5 per cent of the thermodynamic limit for its bandgap, which approaches those achieved by silicon solar cells.