This work makes a comparison between electrocoagulation (EC), photoelectrocoagulation, peroxi-electrocoagulation and peroxi-photoelectrocoagulation processes to investigate the removal of chemical oxygen demand (COD) from pharmaceutical wastewater. The effects of operational parameters such as initial pH, current density, applied voltage, amount of hydrogen peroxide and electrolysis time on COD removal efficiency were investigated and the optimum operating range for each of these operating variables was experimentally determined. In electrocoagulation process, the optimum values of pH and voltage were determined to be 7 and 40 V, respectively. Desired pH and hydrogen peroxide concentration in the Fenton-based processes were found to be 3 and 300 mg/L, respectively. The amounts of COD, pH, electrical conductivity, temperature and total dissolved solids (TDS) were on-line monitored. Results indicated that under the optimum operating range for each process, the COD removal efficiency was in order of peroxi-electrocoagulation > peroxi-photoelectrocoagulation > photoelectrocoagulation>electrocoagulation. Finally, a kinetic study was carried out using the linear pseudo-second-order model and results showed that the pseudo-second-order equation provided the best correlation for the COD removal rate.