In situ treated real textile wastewater was subjected to electrocoagulation for reuse in agricultural irrigation The effect of several parameters such as electrode type (Al and Fe), current density (12.5-100 mA/cm(2)), initial pH (5-10), and electrocoagulation time (0-120 min) were investigated to determine the optimum electrocoagulation condition. Monopolar electrodes connected in parallel were used for all experiments. The performance of the experiments was mainly evaluated using the Total Organic Carbon (TOC) removal. The Al electrode, 25 mA/cm(2) of current density and a pH=5 was selected as the optimum conditions. Under these conditions 42.5% TOC, 18.6% chemical oxygen demand (COD), 83.5% turbidity, 64.7% of the total suspended solids, and 90.3-94.9% color removal efficiencies were achieved. The operating cost was calculated by considering the energy and electrode consumption and evaluated as 1.5 $/m(3) of treated wastewater. The electrocoagulation reaction followed the second order reaction kinetics. (C) 2019 Institution of Chemical Engineers. Published by Elsevier B.V. All rights reserved.