The analysis of volatiles in magmatic systems can be used to constrain the volatile content of the Earth's mantle and the influence that magmatic degassing has on the chemistry of the oceans and the atmosphere. But most volatile elements have very low solubilities in magmas at atmospheric pressure, and therefore virtually all erupted lavas are degassed and do not retain their primary volatile signatures. Here we report the undersaturated pre-eruptive volatile content for a suite of mid-ocean-ridge basalts from the Siqueiros intra-transform spreading centre. The undersaturation leads to correlations between volatiles and refractory trace elements that provide new constraints on volatile abundances and their behaviour in the upper mantle. Our data generate improved limits on the abundances of carbon dioxide, water, fluorine, sulphur and chlorine in the source of normal mid-ocean-ridge basalt. The incompatible behaviour of carbon dioxide, together with the CO(2)/Nb and CO(2)/Cl ratios, permit estimates of primitive carbon dioxide and chlorine to be made for degassed and chlorine-contaminated mid-ocean-ridge basalt magmas, and hence constrain degassing and contamination histories of mid-ocean ridges.