The soil in terrestrial and coastal blue carbon ecosystems is an important carbon sink. National carbon inventories require accurate assessments of soil carbon in these ecosystems to aid conservation, preservation, and nature-based climate change mitigation strategies. Here we harmonise measurements from Australia’s terrestrial and blue carbon ecosystems and apply multi-scale machine learning to derive spatially explicit estimates of soil carbon stocks and the environmental drivers of variation. We find that climate and vegetation are the primary drivers of variation at the continental scale, while ecosystem type, terrain, clay content, mineralogy and nutrients drive subregional variations. We estimate that in the top 0–30 cm soil layer, terrestrial ecosystems hold 27.6 Gt (19.6–39.0 Gt), and blue carbon ecosystems 0.35 Gt (0.20–0.62 Gt). Tall open eucalypt and mangrove forests have the largest soil carbon content by area, while eucalypt woodlands and hummock grasslands have the largest total carbon stock due to the vast areas they occupy. Our findings suggest these are essential ecosystems for conservation, preservation, emissions avoidance, and climate change mitigation because of the additional co-benefits they provide.