Bright and efficient blue emission is key to further development of metal halide perovskite light-emitting diodes. Although modifying bromide/chloride composition is straightforward to achieve blue emission, practical implementation of this strategy has been challenging due to poor colour stability and severe photoluminescence quenching. Both detrimental effects become increasingly prominent in perovskites with the high chloride content needed to produce blue emission. Here, we solve these critical challenges in mixed halide perovskites and demonstrate spectrally stable blue perovskite light-emitting diodes over a wide range of emission wavelengths from 490 to 451 nanometres. The emission colour is directly tuned by modifying the halide composition. Particularly, our blue and deep-blue light-emitting diodes based on three-dimensional perovskites show high EQE values of 11.0% and 5.5% with emission peaks at 477 and 467 nm, respectively. These achievements are enabled by a vapour-assisted crystallization technique, which largely mitigates local compositional heterogeneity and ion migration.