Lighting accounts for one-fifth of global electricity consumption1. Single materials with efficient and stable white-light emission are ideal for lighting applications, but photon emission covering the entire visible spectrum is difficult to achieve using a single material. Metal halide perovskites have outstanding emission properties2,3; however, the best-performing materials of this type contain lead and have unsatisfactory stability. Here we report a lead-free double perovskite that exhibits efficient and stable white-light emission via self-trapped excitons that originate from the Jahn-Teller distortion of the AgCl6 octahedron in the excited state. By alloying sodium cations into Cs2AgInCl6, we break the dark transition (the inversion-symmetry-induced parity-forbidden transition) by manipulating the parity of the wavefunction of the self-trapped exciton and reduce the electronic dimensionality of the semiconductor4. This leads to an increase in photoluminescence efficiency by three orders of magnitude compared to pure Cs2AgInCl6. The optimally alloyed Cs2(Ag0.60Na0.40)InCl6 with 0.04 per cent bismuth doping emits warm-white light with 86 ± 5 per cent quantum efficiency and works for over 1,000 hours. We anticipate that these results will stimulate research on single-emitter-based white-light-emitting phosphors and diodes for next-generation lighting and display technologies.