The treatability of biodiesel wastewater by the electrochemical peroxidation process following acidification pretreatment was investigated. Box-Behnken design, one of the experimental designs of response surface methodology, was applied to optimize the process parameters for chemical oxygen demand (COD), oil-grease, and volatile fatty acids (VFAs) removal from biodiesel wastewater. The process parameters, i.e., applied current, H2O2/COD ratio, and reaction time, were optimized and the total cost of the process was determined. After the acidification process as a pretreatment, the COD, oil-grease, and VFAs removal efficiencies were 25.4%, 68.7%, and 50%, respectively Optimum conditions determined by the developed model for maximum oil-grease removal (98.2%) were applied: current 1.0 A, H2O2/COD ratio 0.4, and reaction time 32.8 minutes. This devised Box-Behnken model predicted removal efficiencies of 45.5%, 98.2%, and 49.5% for COD, oil-grease, and VFAs, respectively. The total cost of the process determined by the model and obtained from the validation experiments was 2.03 euro/m(3) and 1.97 euro/m(3), respectively. The results of the study showed that the applied process was efficient in pollutant removal from acidified biodiesel wastewater and the Box-Behnken design can be applied to explain the mechanism of the process and optimize the process parameters.