Carbon dioxide is the second most abundant magmatic volatile and strongly affects the chemical and physical properties of melts. However, the volumetric properties of CO2-bearing silicate melts and glasses are still poorly constrained. In this study, the density, acoustic velocities and elastic properties of CO2-bearing basaltic, phonolitic and rhyolitic glasses have been determined by the sink/float method and Brillouin scattering spectroscopy to constrain the effect of magma composition on the partial molar volume and compressibility of dissolved CO2. The glasses were synthesized at elevated pressure to achieve high CO2 contents, up to 3.9wt.%, and subsequently annealed at room pressure to relax the pressure-induced densification. The relaxation times indicate that CO2 lowers the viscosity of basaltic melts, while that of rhyolitic and phonolitic melts remains unchanged. The partial molar volume of CO2 depends on the silicate composition with V¯CO2=26.6±1.8, 22.1±0.6 and 25.4±0.9cm3/mol, in basaltic, phonolitic and rhyolitic glasses, respectively, but is not a simple function of the CO2/CO32− speciation. In addition, our data indicate a strong compositionally dependent partial molar adiabatic compressibility with βs¯CO2=−10±11, 6.7±2.2 and 3.6±0.9 10−2GPa−1 for basaltic, phonolitic and rhyolitic glasses, respectively. A plausible compositional dependence of the partial molar volume and compressibility of dissolved CO2 in magmatic liquids may need to be considered in density models for CO2-bearing magmas.