Metal halide perovskites are of great interest for various high-performance optoelectronic applications1. The ability to tune the perovskite bandgap continuously by modifying the chemical composition opens up applications for perovskites as coloured emitters, in building-integrated photovoltaics, and as components of tandem photovoltaics to increase the power conversion efficiency2,3,4. Nevertheless, performance is limited by non-radiative losses, with luminescence yields in state-of-the-art perovskite solar cells still far from 100 per cent under standard solar illumination conditions5,6,7. Furthermore, in mixed halide perovskite systems designed for continuous bandgap tunability2 (bandgaps of approximately 1.7 to 1.9 electronvolts), photoinduced ion segregation leads to bandgap instabilities8,9. Here we demonstrate substantial mitigation of both non-radiative losses and photoinduced ion migration in perovskite films and interfaces by decorating the surfaces and grain boundaries with passivating potassium halide layers. We demonstrate external photoluminescence quantum yields of 66 per cent, which translate to internal yields that exceed 95 per cent. The high luminescence yields are achieved while maintaining high mobilities of more than 40 square centimetres per volt per second, providing the elusive combination of both high luminescence and excellent charge transport10. When interfaced with electrodes in a solar cell device stack, the external luminescence yield—a quantity that must be maximized to obtain high efficiency—remains as high as 15 per cent, indicating very clean interfaces. We also demonstrate the inhibition of transient photoinduced ion-migration processes across a wide range of mixed halide perovskite bandgaps in materials that exhibit bandgap instabilities when unpassivated. We validate these results in fully operating solar cells. Our work represents an important advance in the construction of tunable metal halide perovskite films and interfaces that can approach the efficiency limits in tandem solar cells, coloured-light-emitting diodes and other optoelectronic applications.