Soil salinization is projected to intensify under global warming, posing significant constraints on crop growth and agricultural productivity. Although numerous quantitative studies have investigated soil salinization, comprehensive assessments specifically targeting global croplands remain limited. We hypothesize that, within a machine learning framework, combining soil properties, climate variables and anthropogenic management factors can yield global maps of soil salinity in croplands. For this purpose, we use a random forest (RF) model, with irrigation involved, to predict global cropland soil salinity (ECe) at 0.1° resolution for 1981–2010, capturing its spatiotemporal dynamics. The results indicate that the model performs well (R2 = 0.63), with soil depth, the aridity index and pH being particularly significant factors. High values of ECe were found across central South America, southwestern Africa, central India, and south-central and northeastern China. The proportion of salinized croplands exhibits a long-term upward trend, averaging 4.88%. Ultimately, this study delivers long-term global cropland salinity maps, offering critical insights for safeguarding food security under climate change.