The ocean is a sink for ~25% of the atmospheric CO2 emitted by human activities, an amount in excess of 2 petagrams of carbon per year (PgC yr-1). Time-resolved estimates of global ocean-atmosphere CO2 flux provide an important constraint on the global carbon budget. However, previous estimates of this flux, derived from surface ocean CO2 concentrations, have not corrected the data for temperature gradients between the surface and sampling at a few meters depth, or for the effect of the cool ocean surface skin. Here we calculate a time history of ocean-atmosphere CO2 fluxes from 1992 to 2018, corrected for these effects. These increase the calculated net flux into the oceans by 0.8-0.9 PgC yr-1, at times doubling uncorrected values. We estimate uncertainties using multiple interpolation methods, finding convergent results for fluxes globally after 2000, or over the Northern Hemisphere throughout the period. Our corrections reconcile surface uptake with independent estimates of the increase in ocean CO2 inventory, and suggest most ocean models underestimate uptake.