In this study, degradation of oxacillin in initial solution of 80 ppm was achieved providing high yield of total organic carbon removal, using a powerful, simple and safe method. Two models of response surface method, namely Box–Behnken design (BBD) and central composite design applied to optimize experimental process and theoretical equations were proposed. The F and R2 values were obtained as 76.81 and 0.9900, respectively, in the case of BBD and 187.07 and 0.99641, respectively, in the case of CCD. The highest experimental and predicted values of total organic carbon removal rates were obtained as 75.88% and 75.49%, respectively, under operating conditions such as 373 K of temperature, 35 mM of concentration of H2O2 and 45 min of treatment time in the case of BBD. In the case of CCD, the values were obtained as 76.42% and 76.97%, respectively, under operating conditions such as 373 K of temperature, 55 mM of concentration of H2O2 and 45 min of treatment time. In addition, the reliability of this work lies on genotoxic effect and antimicrobial activity analysis of treated samples. Thus, treated samples did not show any genotoxic effect, and antimicrobial activity was reduced.