Abstract The present research studies the optimization of the preparation of a hydrotrope (mixture of sodium toluenesulfonate and sodium xylenesulfonates) for liquid detergents using experimental designs. The preparation is carried out by selective sulfonation of toluene and xylene present in the BTX fraction of a natural gas. The optimization of five responses has been carried out in two steps. First, we carry out an asymmetrical screening design 2 13 6//18 to select from seven factors, those factors which have significant influence on the amount of residual sodium sulfate in the product and on the total conversion of toluene and xylenes. Secondly, we carry out a Box–Behnken design to optimize three retained factors (temperature, molar ratio of acid to toluene plus xylenes, and the amount of desulfation agent), using response surface methodology. In addition, and in order to reach near-optimal sulfonation conditions, we use the desirability functions to optimize the five responses simultaneously. This allows us to determine for the whole process, sulfonation conditions leading to a high yield of toluene and xylene conversion and acceptable amounts of residual sodium sulfates and sodium benzenesulfonate.