Volcanic emissions link the oxidation state of the Earth's mantle to the composition of the atmosphere. Whether the oxidation state of an ascending magma follows a redox buffer – hence preserving mantle conditions – or deviates as a consequence of degassing remains under debate. Thus, further progress is required before erupted basalts can be used to infer the redox state of the upper mantle or the composition of their co-emitted gases to the atmosphere. Here we present the results of X-ray absorption near-edge structure (XANES) spectroscopy at the iron K-edge carried out for a series of melt inclusions and matrix glasses from ejecta associated with three eruptions of Kīlauea volcano (Hawai‘i). We show that the oxidation state of these melts is strongly correlated with their volatile content, particularly in respect of water and sulfur contents. We argue that sulfur degassing has played a major role in the observed reduction of iron in the melt, while the degassing of H2O and CO2 appears to have had a negligible effect on the melt oxidation state under the conditions investigated. Using gas–melt equilibrium degassing models, we relate the oxidation state of the melt to the composition of the gases emitted at Kīlauea. Our measurements and modelling yield a lower constraint on the oxygen fugacity of the mantle source beneath Kīlauea volcano, which we infer to be near the nickel nickel-oxide (NNO) buffer. Our findings should be widely applicable to other basaltic systems and we predict that the oxidation state of the mantle underneath most hotspot volcanoes is more oxidised than that of the associated lavas. We also suggest that whether the oxidation states of a basalt (in particular MORB) reflects that of its source, is primarily determined by the extent of sulfur degassing.