Knowledge of spatiotemporal distribution and likelihood of (re)occurrence of salt-affected soils is crucial to our understanding of land degradation and for planning effective remediation strategies in face of future climatic uncertainties. However, conventional methods used for tracking the variability of soil salinity/sodicity are extensively localized, making predictions on a global scale difficult. Here, we employ machine-learning techniques and a comprehensive set of climatic, topographic, soil, and remote sensing data to develop models capable of making predictions of soil salinity (expressed as electrical conductivity of saturated soil extract) and sodicity (measured as soil exchangeable sodium percentage) at different longitudes, latitudes, soil depths, and time periods. Using these predictive models, we provide a global-scale quantitative and gridded dataset characterizing different spatiotemporal facets of soil salinity and sodicity variability over the past four decades at a ∼1-km resolution. Analysis of this dataset reveals that a soil area of 11.73 Mkm² located in nonfrigid zones has been salt-affected with a frequency of reoccurrence in at least three-fourths of the years between 1980 and 2018, with 0.16 Mkm² of this area being croplands. Although the net changes in soil salinity/sodicity and the total area of salt-affected soils have been geographically highly variable, the continents with the highest salt-affected areas are Asia (particularly China, Kazakhstan, and Iran), Africa, and Australia. The proposed method can also be applied for quantifying the spatiotemporal variability of other dynamic soil properties, such as soil nutrients, organic carbon content, and pH.