Urocanic acid is a naturally occurring UV-A and UV-B absorbing compound found in the skin. Its use in artificial sunscreens has been abandoned because of health risks associated with the cis isomer. Here we report laser spectroscopic studies on urocanic acid and various substituted derivatives under supersonically cooled conditions. We find that the spectroscopy and excited-state dynamics of urocanic acid are dominantly determined by the nearly degenerate 1nπ* and 1ππ* electronically excited states. These properties are only affected to a minor extent by esterification of the carboxylic acid group or NH alkylation of the N3H tautomer. Tautomerization, on the other hand, has a much more profound influence and leads-from a photoprotective point of view-to more favorable excited-state dynamics. The approach presented here paves the way to tailoring the photoactive properties of urocanic acid for specific applications amongst which their use as safe UV filters.