Two advance oxidation processes (AOPs), namely Fenton and photo-Fenton, was used to purify the Karun Petrochemical wastewater. In order to optimize the maximum chemical oxygen demand (COD) reduction, the effects of initial pH, H2O2, and FeSO4 center dot 7H(2)O doses and the exposure contact time of UV light were investigated during the purification process using response surface methodology (RSM) under the central composite design (CCD). The results revealed the fact that the optimum conditions for the photo-Fenton were obtained to be at initial pH of 4, H2O2 dose of 8 ml/l and FeSO4 center dot 7H(2)O dose of 2.33 g/l and time of 93.75 min. Under these circumstances, the highest COD removal of 83.51% was obtained. In the Fenton process, the optimum conditions at initial pH of 4, H2O2 dose of 8 ml/l, FeSO4 center dot 7H(2)O dose of 3.25 g/l, and UV exposure time of 92.39 min were achieved. Under these conditions, the COD removal was 73.09%.