Marine dissolved organic carbon (DOC) is a major carbon reservoir influencing climate, but is poorly quantified. The lack of a comprehensive DOC climatology hinders model validation, estimation of the modern DOC inventory, and understanding of DOC’s role in the carbon cycle and climate. To address this problem, we used boosted regression trees to relate a compilation of DOC observations to different environmental climatologies, and extrapolated these inferred relationships to the entire ocean to compute annual layer-wise DOC climatologies with uncertainties. Prediction performance was satisfactory, with R² values within 0.6 - 0.8 for all layers and prediction error comparable to within-pixel measurement variability. DOC was mainly predicted by dissolved oxygen in the bathypelagic layer, and by nutrients in other layers. We estimate the total oceanic DOC inventory to be around 690 Pg C. Our results exemplify that machine learning is a powerful tool for constructing climatologies from limited observations.