The Earth’s core is about ten per cent less dense than pure iron (Fe), suggesting that it contains light elements as well as iron. Modelling of core formation at high pressure (around 40–60 gigapascals) and high temperature (about 3,500 kelvin) in a deep magma ocean1,2,3,4,5predicts that both silicon (Si) and oxygen (O) are among the impurities in the liquid outer core6,7,8,9. However, only the binary systems Fe–Si and Fe–O have been studied in detail at high pressures, and little is known about the compositional evolution of the Fe–Si–O ternary alloy under core conditions. Here we performed melting experiments on liquid Fe–Si–O alloy at core pressures in a laser-heated diamond-anvil cell. Our results demonstrate that the liquidus field of silicon dioxide (SiO2) is unexpectedly wide at the iron-rich portion of the Fe–Si–O ternary, such that an initial Fe–Si–O core crystallizes SiO2 as it cools. If crystallization proceeds on top of the core, the buoyancy released should have been more than sufficient to power core convection and a dynamo, in spite of high thermal conductivity10,11, from as early on as the Hadean eon12. SiO2 saturation also sets limits on silicon and oxygen concentrations in the present-day outer core.