Long-wavelength near-infrared light-emitting diodes (NIR LEDs) with peak emission wavelengths beyond 900 nm are of critical importance for various applications including night vision, biomedical imaging, sensing and optical communications. However, the low radiance and poor operational stability of state-of-the-art long-wavelength NIR LEDs based on soft materials remain the most critical factors limiting their practical applications. Here we develop NIR LEDs emitting beyond 900 nm with improved performance through the rational manipulation of p doping in all-inorganic tin perovskites (CsSnI3) by retarding and controlling the crystallization process of perovskite precursors in tin-rich conditions. The resulting NIR LEDs exhibit a peak emission wavelength at 948 nm, high radiance of 226 W sr−1 m−2 and long operational half-lifetime of 39.5 h at a high constant current density of 100 mA cm−2. Our demonstration of efficient and stable NIR LEDs operating at high current densities may also open up new opportunities towards electrically pumped lasers.