Crop yield and food security are both impacted by soil salinization. It is critical for agricultural management and development to map the spatial distribution and severity of salinity. Using the coastal areas of Bangladesh as an example, this study attempted to investigate the usefulness of machine learning algorithms for soil salinity prediction. This study uses secondary data from a paper released in 2010 by the Soil Resource Development Institute, SRMAF Project, Ministry of Agriculture, Bangladesh. Seven ensemble learning models are presented in this paper: Naive Bayes (NB), Logistic Regression (LR), Support Vector Machine (SVM), K-Nearest Neighbour (KNN), Random Forest (RF), Artificial Neural Network (ANN), and Alpha-Beta Pruning (AB). The results showed that RF performed best in terms of accuracy (98.6486%) and root mean square error (RMSE: 0.1035). Hence, RF is recommended for soil salinity prediction.