Ultrasound-assisted cloud point microextraction (UA-CPME) was performed for certain preservatives (p-hydroxy benzoic acid and its alkyl esters, methyl, ethyl, propyl and butyl parabens). Then, an HPLC method was developed for their simultaneous determination in pharmaceutical and cosmetic samples. The chromatograms of these substances were recorded on a C18 column using a gradient elution technique with various solvent systems at different flow rates and at 254 nm wavelength using a diode-array detector (DAD). The analysis conditions found by the classical method were optimized using the Box-Behnken design (BBD). In the design, the effect of each factor was examined with 3 and 4 factors for UA-CPME and HPLC analyses, respectively. The brij 58 concentration (BC), Na2SO4 amount (SA) and extraction time (ET) for UA-CPME, and the mobile phase 1 (MP1) ratio, mobile phase 2 (MP2) ratio, flow rate (FR) and column temperature parameters for HPLC analysis were obtained for the investigated levels. The factors affecting the resolution were determined by applying regression analysis to the experimental results. The analysis of variance (ANOVA) test was applied to ensure result reliability. The ANOVA test was used to determine the reliability of the results. A model was created with the obtained data. The developed method was validated by examining linearity, reproducibility, accuracy, limit of quantification and limit of the detection. Methyl paraben (with 0.148% RSD value and 0.060% relative error), and propyl paraben (with 0.149% RSD value and 0.120% relative error) were determined in the syrup sample by the developed method. Methyl paraben with recovery values of (98.32-99.42)% and ethyl paraben with recovery values of (99.17-99.41)%, were determined in a hand cream.