The present study aimed to optimize the microwave-assisted extraction process for both the peel and pulp of Hylocereus undatus (white dragon fruit) cultivated in Tunisia, using response surface methodology. Total phenolic content, total flavonoid content, FRAP (ferric reducing antioxidant power), and DPPH (1,1-diphenyl-2-picrylhydrazyl) antioxidant activities were optimized. A central composite design (CCD) was applied, considering three key variables: extraction time, extraction temperature, and liquid-to-solid ratio. The optimized extraction parameters for Hylocereus undatus peel and pulp were determined respectively (9.57 min, 42.20 °C and 27.79 mL/g) and (10.08 min, 40.84 °C and 31.52 mL/g). The main phenolic compounds identified in Hylocereus undatus peel and pulp extracts using HPLC-DAD were chlorogenic and caffeic acids and rutin, quercetin, luteolin-7-O-glucoside as flavonoids. Therefore, this research has revealed the potential of a sustainable and eco-friendly process hold promise a directional option and encouraging a circular economy approach for industrial production of antioxidant-rich Hylocereus undatus extracts.