The ultrasonic-assisted extraction of pigments from the Hylocereus undatus flowers was modeled using response surface methodology. A three-level, three-factor Box-Behnken design was employed to optimize three extraction variables, including liquid-solid ratio (X 1 ), extraction time (X 2 ), and ethanol concentration (X 3 ), for the achievement of high absorbance. The statistical analysis shows that the model is significant to optimize the extraction variables (p < 0.01), and the independent variable (X 3 ) and the quadratic term (X 3 2 ) have a significant effect on the absorbance (p < 0.01). The optimized conditions are X 1 of 42 : 1 mL g À1 , X 2 of 33.2 min, and X 3 of 77.5%. Under these conditions, the experimental absorbance is 2.240 AE 0.095% (n ¼ 3), which is in good agreement with the predicted value of 2.243.The evaluation of antioxidant activity by DPPH and hydroxyl free radicals, reducing power, and metal chelating ability indicate that the pigments from the H. undatus flowers possess significant antioxidant activity. HPLC analysis reveals that gallic acid, rutin, quercetin, kaempferol and isorhamnetin are the major components in the pigments. View Article Online a R 2 ¼ 0.9653; R adj 2 ¼ 0.9027; CV% ¼ 2.28.This journal is