Bose–Einstein condensation has been observed in several physical systems, but is not predicted to occur for blackbody radiation such as photons. However, it becomes theoretically possible in the presence of thermalization processes that conserve photon number. Martin Weitz and colleagues have now realized such conditions experimentally, observing Bose–Einstein condensation of photons in a dye-filled optical microcavity. The effect is of interest for fundamental studies and may lead to new coherent ultraviolet sources. Bose–Einstein condensation has been observed in several physical systems, but is not predicted to occur for blackbody radiation such as photons. However, it becomes theoretically possible in the presence of thermalization processes that conserve photon number. These authors experimentally realise such conditions, observing Bose–Einstein condensation of photons in a dye-filled optical microcavity. The effect is of interest for fundamental studies and may lead to new coherent ultraviolet sources. Bose–Einstein condensation (BEC)—the macroscopic ground-state accumulation of particles with integer spin (bosons) at low temperature and high density—has been observed in several physical systems1,2,3,4,5,6,7,8,9, including cold atomic gases and solid-state quasiparticles. However, the most omnipresent Bose gas, blackbody radiation (radiation in thermal equilibrium with the cavity walls) does not show this phase transition. In such systems photons have a vanishing chemical potential, meaning that their number is not conserved when the temperature of the photon gas is varied10; at low temperatures, photons disappear in the cavity walls instead of occupying the cavity ground state. Theoretical works have considered thermalization processes that conserve photon number (a prerequisite for BEC), involving Compton scattering with a gas of thermal electrons11 or photon–photon scattering in a nonlinear resonator configuration12,13. Number-conserving thermalization was experimentally observed14 for a two-dimensional photon gas in a dye-filled optical microcavity, which acts as a ‘white-wall’ box. Here we report the observation of a Bose–Einstein condensate of photons in this system. The cavity mirrors provide both a confining potential and a non-vanishing effective photon mass, making the system formally equivalent to a two-dimensional gas of trapped, massive bosons. The photons thermalize to the temperature of the dye solution (room temperature) by multiple scattering with the dye molecules. Upon increasing the photon density, we observe the following BEC signatures: the photon energies have a Bose–Einstein distribution with a massively populated ground-state mode on top of a broad thermal wing; the phase transition occurs at the expected photon density and exhibits the predicted dependence on cavity geometry; and the ground-state mode emerges even for a spatially displaced pump spot. The prospects of the observed effects include studies of extremely weakly interacting low-dimensional Bose gases9 and new coherent ultraviolet sources15.