Magmatic outgassing of volatiles from Earth's interior probably played a critical part in determining the composition of the earliest atmosphere, more than 4,000 million years (Myr) ago. Given an elemental inventory of hydrogen, carbon, nitrogen, oxygen and sulphur, the identity of molecular species in gaseous volcanic emanations depends critically on the pressure (fugacity) of oxygen. Reduced melts having oxygen fugacities close to that defined by the iron-wüstite buffer would yield volatile species such as CH4, H2, H2S, NH3 and CO, whereas melts close to the fayalite-magnetite-quartz buffer would be similar to present-day conditions and would be dominated by H2O, CO2, SO2 and N2 (refs 1-4). Direct constraints on the oxidation state of terrestrial magmas before 3,850Myr before present (that is, the Hadean eon) are tenuous because the rock record is sparse or absent. Samples from this earliest period of Earth's history are limited to igneous detrital zircons that pre-date the known rock record, with ages approaching ~4,400Myr (refs 5-8). Here we report a redox-sensitive calibration to determine the oxidation state of Hadean magmatic melts that is based on the incorporation of cerium into zircon crystals. We find that the melts have average oxygen fugacities that are consistent with an oxidation state defined by the fayalite-magnetite-quartz buffer, similar to present-day conditions. Moreover, selected Hadean zircons (having chemical characteristics consistent with crystallization specifically from mantle-derived melts) suggest oxygen fugacities similar to those of Archaean and present-day mantle-derived lavas as early as ~4,350Myr before present. These results suggest that outgassing of Earth's interior later than ~200Myr into the history of Solar System formation would not have resulted in a reducing atmosphere.