A simple one-step procedure for synthesis of new derivatives of phenolic acids was developed. As the starting materials salicylic acid, vanillic acid and alkyl haloalkanoates were applied. The reactions were carried out in N,N-dimethylformamide (DMF) in the presence of anhydrous potassium carbonate. Conditions for regioselective synthesis of target compounds were established. The esters 3a-h were obtained in great yields and were characterized by MS, 1H and 13C NMR spectra. Their photoprotective activity was evaluated in vitro by spectrophotometric method. The study revealed that the tested compounds are moderate UVB absorbers, but could be used to augment the effect of other photoprotective agents. Their SPF values were in the range from 3.63 to 4.26 for salicylates 3a-d and from 3.03 to 3.51 for vanillates.