PurposeThe widespread use of washing machines in textile dyeing and finishing boosts product quality while leading to significant wastewater production. This wastewater poses environmental risks due to the textile industry's high pollution levels and water consumption. Sustainability hinges on minimizing water usage and treating wastewater for reuse. This study employs Matlab R2020a and Python 2023 to model experimental designs for treating textile production wastewater using the Fenton oxidation method, aiming to address sustainability concerns in the industry.Design/methodology/approachThe Fenton oxidation process's efficacy and optimal operating conditions were determined through experimental sets employing the Box–Behnken design. Assessing machine learning algorithms on the data, Matlab R2020a utilized an artificial neural network (ANN), while Python 2023 employed support vector regression (SVR), decision trees (DT), and random forest (RF) models. Evaluation of model performance relied on regression coefficient (R2) and mean square error (MSE) outcomes. This methodology aimed to refine the Fenton oxidation process and identify the most efficient parameters, leveraging a combination of experimental design and advanced computational techniques across different programming platforms.FindingsThe study identified optimal conditions: pH 3, Fe+2 concentration of 0.75 g/L, and H2O2 concentration of 5 mM, yielding 87% COD removal. The Box–Behnken design achieved a high R2 of 0.9372, indicating precise predictions. Artificial neural networks (ANN) and support vector regression (SVR) exhibited successful applications, notably achieving an R2 of 0.99936 and low MSE of 0.00416 in the ANN (LOGSIG) model. However, decision trees (DT) and random forests (RF) proved less effective with limited datasets. The findings underscore technology integration in treatment modeling and the environmental imperative of wastewater purification and reuse.Originality/valueThis study, in which water use and wastewater treatment are evaluated with technological integration such as machine learning and data management, reveals how to contribute to targets 6, 9, 12, and 14 within the scope of UNEP 2030 sustainable development goals.