The availability of groundwater is a crucial solution to ensure the sustainability of water resources, including providing clean water. Therefore, efforts to map groundwater potential are required to enhance the efficiency of groundwater utilization and support achieving one of the Sustainable Development Goals (SDGs), particularly clean water and sanitation. This research aims to identify the distribution of the groundwater potential in Kediri Regency using the random forest (RF) and extreme gradient boosting (XGB) algorithms. This research utilizes 13 parameters, including elevation, slope, aspect, drainage density, river density, distance from rivers, lineament density, Topographic Wetness Index (TWI), Normalized Difference Vegetation Index (NDVI), land cover, soil type, lithology, and band 3 from Sentinel-2A satellite imagery. The coordinates of groundwater wells are used as training and testing data with ratios of 80:20, 70:30, and 60:40. Through the evaluation of each model’s performance using a confusion matrix, it is revealed that the best model is the RF 70:30 ratio model with Accuracy (Acc), Specificity (Spe), Sensitivity (Sen), Positive Predictive Value (PPV) values of 0.978, Cohen’s Kappa (CK) and Matthew’s Correlation Coefficient (MCC) of 0.956, and Area Under Curve (AUC) of 0.994. In this model, the elevation has the highest influence on the model, with a significance level equal to 100.