Background Ultraviolet radiation (UVR) by sunlight results in an increasing number of skin conditions. Earlier studies have suggested a protective effect of topical treatment with the pineal hormone melatonin. However, this protective effect has never been evaluated in natural sunlight, and the optimal dosing has not been clarified. Objective The aim of this study was to investigate the sun protective effect of topical treatment with three different doses of melatonin (0.5%, 2.5%, 12.5%) against erythema induced by natural sunlight. Method The study was a randomized, placebo-controlled, double-blind study in healthy volunteers. Twenty-three healthy volunteers, 8 male and 15 female, were enrolled. The protective effect of three different doses of melatonin cream (0.5%, 2.5%, 12.5%) against erythema induced by natural sunlight was tested. All participants had their backs exposed to sun from 1:22 PM to 2:02 PM local time and UV-index was 9. Primary outcome was reduction in erythema evaluated by chromatography after sun exposure, when treated with topical melatonin cream (0.5%, 2.5%, 12.5%) versus placebo and no treatment. The erythema reaction was evaluated with chromatography and visual scoring at baseline, one, four, eight and 24 h after exposure. Results Significant difference in erythema formation was found between areas treated with melatonin cream 12.5% and areas receiving placebo or no treatment (repeated measures ANOVA p = 0.001). No differences were found between placebo and the 0.5% and 2.5% concentrations. Conclusion Application of melatonin cream 12.5% protects against natural sunlight induced erythema.