Light-emitting diodes (LEDs), which convert electricity to light, are widely used in modern society—for example, in lighting, flat-panel displays, medical devices and many other situations. Generally, the efficiency of LEDs is limited by nonradiative recombination (whereby charge carriers recombine without releasing photons) and light trapping1-3. In planar LEDs, such as organic LEDs, around 70 to 80 per cent of the light generated from the emitters is trapped in the device4,5, leaving considerable opportunity for improvements in efficiency. Many methods, including the use of diffraction gratings, low-index grids and buckling patterns, have been used to extract the light trapped in LEDs6-9. However, these methods usually involve complicated fabrication processes and can distort the light-output spectrum and directionality6,7. Here we demonstrate efficient and high-brightness electroluminescence from solution-processed perovskites that spontaneously form submicrometre-scale structures, which can efficiently extract light from the device and retain wavelength- and viewing-angle-independent electroluminescence. These perovskites are formed simply by introducing amino-acid additives into the perovskite precursor solutions. Moreover, the additives can effectively passivate perovskite surface defects and reduce nonradiative recombination. Perovskite LEDs with a peak external quantum efficiency of 20.7 per cent (at a current density of 18 milliamperes per square centimetre) and an energy-conversion efficiency of 12 per cent (at a high current density of 100 milliamperes per square centimetre) can be achieved—values that approach those of the best-performing organic LEDs.