The widespread utilization of groundwater in various sectors, including households for drinking purposes and the agricultural and industrial domains, has elevated its status as an indispensable and crucial natural resource. Groundwater has seen significant changes in both quantity and quality factors. Water Quality Index (WQI), which is dependent on a number of factors, is still a crucial gauge of water quality (WQ) and a key component of efficient water management. If there is an automated method for forecasting WQ, the administration will benefit. The main goal of this project is to develop a machine learning (ML) model to forecast the quality of groundwater in several areas of Tamil Nadu (TN), India. The available dataset encompasses comprehensive data groundwater attributes, encompassing parameters such as pH, electrical conductivity (EC), total hardness (TH), calcium (Ca[Formula: see text], magnesium (Mg[Formula: see text], sodium (Na[Formula: see text], bicarbonate (HCO[Formula: see text], nitrate (NO[Formula: see text], sulfate (SO[Formula: see text], and chloride (Cl[Formula: see text]. In this study, various ML regression algorithms such as linear, least angle, random forest and support vector regressor models and their comparison with the ensemble model (EM) were depicted to predict WQI, and the results were evaluated using performance metrics. It is found that the EM has a lower RMSE in the order of [Formula: see text]. Further, the predicted WQI values are used to classify the districts of TN.