Coastal ecosystems play a major role in marine carbon budgets, but substantial uncertainties remain in the sources and fluxes of coastal carbon dioxide (CO2). Here, we assess when, where, and how submarine groundwater discharge (SGD) releases CO2 to shallow coastal ecosystems. Time-series observations of dissolved CO2 and radon (222Rn, a natural groundwater tracer) across 40 coastal systems from 14 countries revealed large SGD-derived CO2 fluxes. The mean groundwater partial pressure of CO2 was 35 times higher than surface seawater. The mean SGD-derived CO2 flux was 148 ± 226 millimoles per square meter per day (mmol m-2 day-1), resulting in a mean water-air CO2 flux of 80 ± 133 mmol m-2 day-1. Tidal rather than diel cycles drove CO2 enrichment in most ecosystems. Tidally driven SGD was the primary CO2 source in mangroves, salt marshes, tidal flats, estuaries, and canals. Overall, we expand current knowledge of marine carbon cycles by demonstrating SGD as an important source of CO2 that requires inclusion in coastal carbon budgets.