Soilless tomato cultivation requires significant water and nutrient inputs, resulting in the generation of drainage water (DW) with varying macro- and micronutrient compositions. This poses challenges for effective nutrient’s reuse due to technological and economic constraints. This study investigates the feasibility of using electrocoagulation, employing aluminum electrodes, to treat DW. The experiment involved three different current densities (2 A/m2, 4 A/m2, and 8 A/m2) and a 24-hour hydraulic retention time (comprising 4 h of electrocoagulation followed by 20 h of stirring). Treatment performance, kinetics, sludge characteristics, and energy consumption were evaluated. The elemental composition of the electrocoagulation-treated DW, including P, N, S, Cl, Ca, Mg, K, Na, Mo, Mn, Fe, Zn, Cu, B, organic compounds, and Al, was analyzed. The results showed that higher current densities resulted in increased pollutant removal rates and efficiencies. Importantly, the electrocoagulation process facilitated phosphorus recovery at pH < 7.0, ranging from 95.3 ± 0.6 % (at 2 A/m2) to 99.9 ± 0.1 % (at 8 A/m2), with corresponding energy consumption between 6.03 kWh/kgP and 29.98 kWh/kgP. Electrocoagulation as a drainage water treatment not only offers phosphorus recovery, but can also recovery B, and – to a certain extent – S, Mg, K, Mn, Zn and Cu. Other elements, such as Na and Cl, remained at stable levels. This allows for the separation of valuable elements (P) from those that interfere with cultivation (Na, Cl). This research could contribute to the development of a precise treatment process to address nutrient and pollutant management challenges in agricultural wastewater.