Precise prediction of soil salinity using visible, and near-infrared (vis-NIR) spectroscopy is crucial for ensuring food security and effective environmental management. This paper focuses on the precise prediction of soil salinity utilizing visible and near-infrared (vis-NIR) spectroscopy, a critical factor for food security and effective environmental management. The objective is to utilize vis-NIR spectra alongside a multiple regression model (MLR) and a random forest (RF) modeling approach to predict soil salinity across various land use types, such as farmlands, bare lands, and rangelands accurately. To this end, we selected 150 sampling points representatives of these diverse land uses. At each point, we collected soil samples to measure the soil salinity (ECe) and employed a portable spectrometer to capture the spectral reflectance across the full wavelength range of 400 to 2400 nm. The methodology involved using both individual spectral reflectance values and combinations of reflectance values from different wavelengths as input variables for developing the MLR and RF models. The results indicated that the RF model (RMSE = 4.85 dS m-1, R2 = 0.87, and RPD = 3.15), utilizing combined factors as input variables, outperformed others. Furthermore, our analysis across different land uses revealed that models incorporating combined input variables yielded significantly better results, particularly for farmlands and rangelands. This study underscores the potential of combining vis-NIR spectroscopy with advanced modeling techniques to enhance the accuracy of soil salinity predictions, thereby supporting more informed agricultural and environmental management decisions.