Skin Cancer and Melanoma

What actually prevents skin cancer?

Daily sunscreen likely lowers squamous cell skin cancer, while the nicotinamide benefit is provisional and absent in transplant recipients.

European guidance puts limiting excessive sun exposure and never using tanning beds first12. Within that, daily sunscreen reduced squamous cell cancers in a randomized trial, with a fall in invasive melanoma at 10-year follow-up1,14. A vitamin B3 form, nicotinamide, lowered new nonmelanoma skin cancers by 23% in a 386-person trial of high-risk adults, but not in organ-transplant recipients, and no benefit was seen after stopping4,5.

What you can do

  • The European Code Against Cancer advises avoiding excessive sun (especially for children), using sun protection and never using sunbeds12.
  • In a long-running Australian trial, adults assigned to daily sunscreen had fewer squamous cell cancers (rate ratio 0.62) and fewer invasive melanomas than those using it as they chose1,3.
  • Nicotinamide is studied in people with at least two prior nonmelanoma skin cancers: in ONTRAC it lowered new cancers by 23% over 12 months, with no benefit after stopping4.

Be careful if

  • Nicotinamide did not work in a 158-person transplant trial5, its benefit was not seen after stopping4, and trials lasted 12 months or less7; ask a dermatologist.
  • Sunscreen ingredients entered the blood above an FDA testing threshold in a 24-person trial; the authors said this does not mean people should avoid sunscreen10.
  • Observational data show no lower melanoma risk at higher vitamin D levels11, and the European Code advises never using sunbeds12.
How it works What it does in your body, in plain words 3 min

Limiting sun exposure and sunbeds first

The European Code Against Cancer, in its 2026 evidence summary, advises individuals to avoid excessive sun exposure (especially in children), use sun protection, and never use sunbeds12. Solar UV radiation, and to a lesser extent artificial UV, are major causes of skin cancer12. Sunscreen is one of several tools; see sun exposure and skin cancer for the broader picture and how to spot skin cancer for what to look for.

Sunscreen

The best randomized evidence comes from Nambour, Queensland, where 1,621 adults were assigned to daily sunscreen on the head and arms or to using it at their discretion, and followed for years1. Daily use reduced squamous cell cancers14 and, over 10 years after the trial, invasive melanomas1. A large Norwegian cohort of women also found that SPF 15 or higher was associated with lower melanoma risk than lower SPF products, even though sunscreen users reported more sunburns, sunbathing vacations and indoor tanning2. Which type to buy: choosing a safe sunscreen and chemical versus mineral.

Sunscreen absorption is a real question. In a small trial, ingredients in four commercial sunscreens reached the blood at levels above the FDA's threshold for further safety testing; the clinical significance is unknown and the authors said this should not discourage use10. The FDA has requested data from industry to confirm the safety of sunscreen active ingredients, and products that are not broad-spectrum or have an SPF below 15 must state that they help prevent sunburn, not skin cancer13.

Nicotinamide

Nicotinamide is a form of vitamin B3 that has been tested as a pill to prevent new skin cancers in people already prone to them4. In the ONTRAC trial, 386 people with at least two prior nonmelanoma skin cancers took 500 mg twice a day or placebo for 12 months; new cancers were 23% lower with nicotinamide, and the benefit was not seen after stopping4. In 158 transplant recipients (ONTRANS), it made no difference5. A 2022 meta-analysis (published before the transplant trial) and a retrospective cohort also found lower rates, while the transplant trial did not; a 2026 review calls the benefit in non-transplant adults provisional because it rests mainly on one trial6,7,8. This is the oral form; for skin-care uses of the topical form, see niacinamide.

Vitamin D and the sun trade-off

Vitamin D is formed mainly in the skin on exposure to sunlight, which is why people worry about avoiding the sun11. Observational data in a meta-analysis found no lower melanoma risk at higher blood vitamin D levels11, and the European Code advises never using sunbeds12. For vitamin D itself, see the sunshine vitamin and supplementation.

The evidence The studies, what they found, and how much to trust them 5 min · 14 sources

Nambour: sunscreen and melanoma

In 1992, 1,621 randomly selected adults aged 25 to 75 in Nambour, Queensland, were randomized to daily or discretionary sunscreen on the head and arms, in combination with 30 mg beta carotene or placebo, until 1996, then observed until 20061. Ten years after the trial, 11 new primary melanomas had occurred in the daily-sunscreen group and 22 in the discretionary group (hazard ratio 0.50; 95% CI 0.24 to 1.02; P = .051)1. The reduction was larger for invasive melanomas (3 versus 11; hazard ratio 0.27; 95% CI 0.08 to 0.97) than for preinvasive ones (hazard ratio 0.73; 95% CI 0.29 to 1.81)1. The authors concluded melanoma may be preventable by regular sunscreen use in adults1. The main result narrowly missed statistical significance, the trial was Australian, and the comparison group used sunscreen as it chose rather than none.

A separate report of the same trial, covering the 4.5-year trial plus 8 further years of follow-up, found squamous cell carcinoma rates decreased by almost 40% with daily sunscreen (rate ratio 0.62; 95% CI 0.38 to 0.99), while basal cell carcinoma tended to decrease but not significantly14. A 2026 JAMA review summarizes the same result, with 1,587 versus 953 cases per 100,000 person-years3.

Norwegian cohort

The Norwegian Women and Cancer Study followed 143,844 women aged 40 to 75 for 1,532,247 person-years, with 722 melanomas2. SPF 15 or higher sunscreen was associated with lower melanoma than SPF below 15 (hazard ratio 0.67; 95% CI 0.53 to 0.83), and the authors estimated that general use of SPF 15 or higher by women this age could reduce melanoma by 18% (95% CI 4% to 30%)2. Sunscreen users reported more sunburns and sunbathing vacations, so this comparison is open to confounding in both directions2.

Nicotinamide trials

ONTRAC was a phase 3, double-blind trial of 386 participants who had had at least two nonmelanoma skin cancers in the previous 5 years; 500 mg of nicotinamide twice daily was compared with placebo for 12 months4. At 12 months the rate of new nonmelanoma skin cancers was 23% lower (95% CI 4 to 38; P = 0.02), basal cell carcinomas 20% lower (95% CI -6 to 39; P = 0.12) and squamous cell carcinomas 30% lower (95% CI 0 to 51; P = 0.05)4. Actinic keratoses were 11% lower at 3 months and 13% lower at 12 months4. Adverse events did not differ, and there was no evidence of benefit after nicotinamide was discontinued4.

ONTRANS gave the same dose for 12 months to organ-transplant recipients with at least two keratinocyte cancers in 5 years; the trial stopped early because of poor recruitment5. Of 158 participants, there were 207 new keratinocyte cancers with nicotinamide and 210 with placebo (rate ratio 1.0; 95% CI 0.8 to 1.3; P = 0.96)5.

A systematic review and meta-analysis of randomized trials found 29 trials (3,039 patients) with a rate ratio of 0.50 (95% CI 0.29 to 0.85; 5 trials, 552 patients; moderate strength) for skin cancers, and more digestive adverse events with nicotinamide6. A narrower 2026 review of five comparative studies was more cautious: in high-risk immunocompetent adults the benefit rested predominantly on ONTRAC (rate ratio 0.77; 95% CI 0.62 to 0.96) and should be regarded as provisional, while two transplant trials (180 people) pooled to a rate ratio of 0.97 (95% CI 0.77 to 1.22)7.

The retrospective cohort

A 2025 cohort study used Veterans Affairs health records for 33,822 patients, comparing 12,287 men and women taking 500 mg of nicotinamide twice daily for more than 30 days with 21,479 matched unexposed patients8. There was a 14% reduction in skin cancer risk overall, which rose to 54% when nicotinamide was started after a first skin cancer and declined when started after later ones8. Among transplant recipients there was no overall reduction8. This design cannot rule out confounding, and the cohort was mostly older White men (mean age 77)8. A companion cost-effectiveness analysis used the same cohort, so it adds no independent evidence9.

Sunscreen absorption

In a randomized phase 1 trial, 24 healthy volunteers were assigned to one of four sunscreens (two sprays, a lotion, a cream), applied at 2 mg per cm2 to 75% of the body surface four times a day for 4 days, with 30 blood samples over 7 days10. Maximum plasma concentrations exceeded 0.5 ng/mL for all four products after four applications on day 110. Geometric mean maximum concentrations were 1.8 to 4.3 ng/mL for avobenzone, 169.3 to 209.6 ng/mL for oxybenzone (three products), 2.9 to 7.8 ng/mL for octocrylene and 1.5 ng/mL for ecamsule10. The most common adverse event was a rash, in 1 participant per sunscreen10. The authors said the clinical significance is unknown and the results do not indicate that individuals should refrain from sunscreen use10.

Vitamin D and skin cancer

A meta-analysis of 20 papers (1,420 melanoma and 2,317 non-melanoma cases) compared highest with lowest vitamin D levels: the summary relative risk was 1.46 (95% CI 0.60 to 3.53) for melanoma and 1.64 (95% CI 1.02 to 2.65) for non-melanoma skin cancer11. For intake, relative risks were 0.86 (95% CI 0.63 to 1.13) and 1.03 (95% CI 0.95 to 1.13)11. The authors found data suggestive of an inverse association between vitamin D blood levels and melanoma thickness at diagnosis, and called for more research11. These are observational data and cannot show whether vitamin D protects.

How sure are we?

Moderately sure for sunscreen and squamous cell carcinoma, based on a randomized trial1,3. Less sure for melanoma, where the primary Nambour result narrowly missed significance and the cohort data are observational1,2. For nicotinamide, a 2026 review calls the benefit in high-risk non-transplant adults provisional because it rests predominantly on one pivotal trial, with a retrospective cohort in the same direction; it was not seen after stopping or in transplant recipients4,5,7,8. The advice to limit excessive sun exposure and avoid sunbeds rests on UV being an established major cause of skin cancer12.

  1. Reduced melanoma after regular sunscreen use: randomized trial follow-up. Green AC, Williams GM, Logan V, Strutton GM. Journal of Clinical Oncology, 2011. PubMed 21135266 (opens in a new tab)
  2. Sunscreen Use and Subsequent Melanoma Risk: A Population-Based Cohort Study. Ghiasvand R, Weiderpass E, Green AC, Lund E, Veierød MB. Journal of Clinical Oncology, 2016. PubMed 27621396 (opens in a new tab)
  3. Keratinocyte Carcinoma: A Review. Wehner MR. JAMA, 2026. PubMed 41165676 (opens in a new tab)
  4. A Phase 3 Randomized Trial of Nicotinamide for Skin-Cancer Chemoprevention. Chen AC, Martin AJ, Choy B, Fernández-Peñas P, Dalziell RA, McKenzie CA, Scolyer RA, Dhillon HM, Vardy JL, Kricker A, St George G, Chinniah N, Halliday GM, Damian DL. New England Journal of Medicine, 2015. PubMed 26488693 (opens in a new tab)
  5. Nicotinamide for Skin-Cancer Chemoprevention in Transplant Recipients. Allen NC, Martin AJ, Snaidr VA, Eggins R, Chong AH, Fernandéz-Peñas P, Gin D, Sidhu S, Paddon VL, Banney LA, Lim A, Upjohn E, Schaider H, Ganhewa AD, Nguyen J, McKenzie CA, Prakash S, McLean C, Lochhead A, Ibbetson J, Dettrick A, Landgren A, Allnutt KJ, Allison C, Davenport RB, Mumford BP, Wong B, Stagg B, Tedman A, Gribbin H, Edwards HA, De Rosa N, Stewart T, Doolan BJ, Kok Y, Simpson K, Low ZM, Kovitwanichkanont T, Scolyer RA, Dhillon HM, Vardy JL, Chadban SJ, Bowen DG, Chen AC, Damian DL. New England Journal of Medicine, 2023. PubMed 36856616 (opens in a new tab)
  6. Effect of Nicotinamide in Skin Cancer and Actinic Keratoses Chemoprophylaxis, and Adverse Effects Related to Nicotinamide: A Systematic Review and Meta-Analysis. Mainville L, Smilga AS, Fortin PR. Journal of Cutaneous Medicine and Surgery, 2022. PubMed 35134311 (opens in a new tab)
  7. Oral Nicotinamide for the Secondary Prevention of Cutaneous Squamous Cell Carcinoma and Other Keratinocyte Carcinomas: A Systematic Review. Guerra Jiménez AL, Ortegón Garciaherreros JC, Suárez Escobar LP, Vargas Monroy LV, Madariaga Estupiñán MC. Journal of Skin Cancer, 2026. PubMed 42835758 (opens in a new tab)
  8. Nicotinamide for Skin Cancer Chemoprevention. Breglio KF, Knox KM, Hwang J, Weiss R, Maas K, Zhang S, Yao L, Madden C, Xu Y, Hartman RI, Wheless L. JAMA Dermatology, 2025. PubMed 40960808 (opens in a new tab)
  9. Cost-Effectiveness of Oral Nicotinamide for Keratinocyte Carcinoma Prevention. Perez D, Breglio KF, Knox KM, Pereira AC, Gaziano JM, Wheless LE, Hartman RI. JAMA Dermatology, 2026. PubMed 42268603 (opens in a new tab)
  10. Effect of Sunscreen Application Under Maximal Use Conditions on Plasma Concentration of Sunscreen Active Ingredients: A Randomized Clinical Trial. Matta MK, Zusterzeel R, Pilli NR, Patel V, Volpe DA, Florian J, Oh L, Bashaw E, Zineh I, Sanabria C, Kemp S, Godfrey A, Adah S, Coelho S, Wang J, Furlong LA, Ganley C, Michele T, Strauss DG. JAMA, 2019. PubMed 31058986 (opens in a new tab)
  11. Vitamin D and melanoma and non-melanoma skin cancer risk and prognosis: a comprehensive review and meta-analysis. Caini S, Boniol M, Tosti G, Magi S, Medri M, Stanganelli I, Palli D, Assedi M, Marmol VD, Gandini S. European Journal of Cancer, 2014. PubMed 25087185 (opens in a new tab)
  12. European Code Against Cancer, 5th edition - ultraviolet radiation, radon and cancer. Ritchie D, Crowley Q, Greinert R, Albin M, Baldi I, Consonni D, Fervers B, Hoek G, Jochems SHJ, Röösli M, van Tongeren M, Vilahur N, Feliu A, Zeeb H, Schüz J, D'Souza E, Espina C, Kromhout H. Molecular Oncology, 2026. PubMed 41542817 (opens in a new tab)
  13. Sunscreen: How to Help Protect Your Skin from the Sun. U.S. Food and Drug Administration. FDA Consumer Update, 2026. Source (opens in a new tab)
  14. Prolonged prevention of squamous cell carcinoma of the skin by regular sunscreen use. van der Pols JC, Williams GM, Pandeya N, Logan V, Green AC. Cancer Epidemiology, Biomarkers & Prevention, 2006. PubMed 17132769 (opens in a new tab)

Every change to this page is tracked in version control. View edit history. If you have conflicting research, we want to hear about it.

Spotted something wrong or out of date? Suggest a change.

Weekly research digest

New topics and updated research, once a week when there's something new. How it works