Hydrous fluids released from subducting oceanic lithosphere fuel arc magmatism and associated hydrothermal mineralization, including formation of porphyry copper deposits. Critical magma degassing parameters are the depth, chemistry and style of fluid release during magma ascent, notably the behaviour of chlorine, a key metal-transporting ligand. Currently, understanding is limited by restricted data on fluid-melt partitioning of chlorine as a function of pressure and magma chemistry, and the complex interplay between the two that occurs in polybaric magmatic systems. Here we present experimental determinations of chlorine partitioning as a function of fluid and melt composition at pressures from 50 to 800 MPa. We provide, for the first time, a quantitative understanding of chlorine and copper evolution that is valid for shallow, deep or transcrustal differentiation and degassing. Monte Carlo simulations using our new data reproduce the chemical evolution of melt inclusions from arc volcanoes and fluid inclusions from upper crustal intrusions and porphyry copper deposits. Our results not only provide a novel chemical framework for understanding magma degassing, but quantify the primacy of magmatic chlorine concentration at the point of fluid saturation in promoting efficient copper extraction from magmas.