The most viscous volcanic melts and the largest explosive eruptions1on our planet consist of calcalkaline rhyolites2,3. These eruptions have the potential to influence global climate4. The eruptive products are commonly very crystal-poor and highly degassed, yet the magma is mostly stored as crystal mushes containing small amounts of interstitial melt with elevated water content5. It is unclear how magma mushes are mobilized to create large batches of eruptible crystal-free magma. Further, rhyolitic eruptions6,7,8can switch repeatedly between effusive and explosive eruption styles and this transition is difficult to attribute to the rheological effects of water content or crystallinity9,10. Here we measure the viscosity of a series of melts spanning the compositional range of the Yellowstone volcanic system and find that in a narrow compositional zone, melt viscosity increases by up to two orders of magnitude. These viscosity variations are not predicted by current viscosity models11,12and result from melt structure reorganization, as confirmed by Raman spectroscopy. We identify a critical compositional tipping point, independently documented in the global geochemical record of rhyolites, at which rhyolitic melts fluidize or stiffen and that clearly separates effusive from explosive deposits worldwide. This correlation between melt structure, viscosity and eruptive behaviour holds despite the variable water content and other parameters, such as temperature, that are inherent in natural eruptions. Thermodynamic modelling demonstrates how the observed subtle compositional changes that result in fluidization or stiffening of the melt can be induced by crystal growth from the melt or variation in oxygen fugacity. However, the rheological effects of water and crystal content alone cannot explain the correlation between composition and eruptive style. We conclude that the composition of calcalkaline rhyolites is decisive in determining the mobilization and eruption dynamics of Earth’s largest volcanic systems, resulting in a better understanding of how the melt structure controls volcanic processes.