White dwarfs, the extremely dense remnants left behind by most stars after their death, are characterised by a mass comparable to that of the Sun compressed into the size of an Earth-like planet. In the resulting strong gravity, heavy elements sink toward the centre, and the upper layer of the atmosphere contains only the lightest element present, usually hydrogen, or, if the hydrogen content is low, helium. Helium-atmosphere white dwarfs account for about 20% of all white dwarfs; however, several mechanisms can compete with gravitational settling to change their surface composition as they cool, and the fraction of white dwarfs with helium atmospheres is not constant at all temperatures. This fraction is known to increase by a factor ~2.5 below a temperature of about 30,000 K; therefore, some white dwarfs that appear to have a hydrogen-dominated atmosphere above that temperature are bound to transition to a helium-dominated atmosphere as they cool below it. Here we report observations of ZTF J203349.8+322901.1, or ``Janus'', a white dwarf with two faces: one side of its atmosphere is dominated by hydrogen and the other one by helium. The peculiar double-faced nature of Janus is most likely caused by a small magnetic field, which creates an inhomogeneity in temperature, pressure, or mixing strength over the surface. We appear to have caught a white dwarf as it is undergoing the transition from a hydrogen-dominated to a helium-dominated atmosphere. If this is the case, Janus might be the most extreme member of a class of magnetic transitioning white dwarfs and could help shed light on the physical mechanisms behind white dwarf spectral evolution.