---
topic: "Skin Cancer and Melanoma"
title: "Preventing Skin Cancer: Sunscreen and Nicotinamide"
order: 2
description: "What trials show for daily sunscreen and oral nicotinamide in preventing skin cancer, where they fall short, and how sunscreen absorption and vitamin D fit in."
question: "What actually prevents skin cancer?"
answer: "Daily sunscreen likely lowers squamous cell skin cancer, while the nicotinamide benefit is provisional and absent in transplant recipients."
actions:
  - "The European Code Against Cancer advises avoiding excessive sun (especially for children), using sun protection and never using sunbeds [12]."
  - "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 chose [1][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 stopping [4]."
cautions:
  - "Nicotinamide did not work in a 158-person transplant trial [5], its benefit was not seen after stopping [4], and trials lasted 12 months or less [7]; 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 sunscreen [10]."
  - "Observational data show no lower melanoma risk at higher vitamin D levels [11], and the European Code advises never using sunbeds [12]."
confidence: 3
confidenceNote: "Sunscreen: one 1,621-person trial plus a 143,844-woman cohort. Nicotinamide: one 386-person trial, a null transplant trial and a retrospective cohort; a 2026 review calls it provisional."
evidenceSummary:
  rctCount: 5
  observationalCount: 2
  metaAnalysisCount: 3
  totalParticipants: "143,844"
  replicated: false
  newestStudyYear: 2026
references:
  - id: "1"
    pmid: "21135266"
    title: "Reduced melanoma after regular sunscreen use: randomized trial follow-up"
    authors: "Green AC, Williams GM, Logan V, Strutton GM"
    year: 2011
    journal: "Journal of Clinical Oncology"
  - id: "2"
    pmid: "27621396"
    title: "Sunscreen Use and Subsequent Melanoma Risk: A Population-Based Cohort Study"
    authors: "Ghiasvand R, Weiderpass E, Green AC, Lund E, Veierød MB"
    year: 2016
    journal: "Journal of Clinical Oncology"
  - id: "3"
    pmid: "41165676"
    title: "Keratinocyte Carcinoma: A Review"
    authors: "Wehner MR"
    year: 2026
    journal: "JAMA"
  - id: "4"
    pmid: "26488693"
    title: "A Phase 3 Randomized Trial of Nicotinamide for Skin-Cancer Chemoprevention"
    authors: "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"
    year: 2015
    journal: "New England Journal of Medicine"
  - id: "5"
    pmid: "36856616"
    title: "Nicotinamide for Skin-Cancer Chemoprevention in Transplant Recipients"
    authors: "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"
    year: 2023
    journal: "New England Journal of Medicine"
  - id: "6"
    pmid: "35134311"
    title: "Effect of Nicotinamide in Skin Cancer and Actinic Keratoses Chemoprophylaxis, and Adverse Effects Related to Nicotinamide: A Systematic Review and Meta-Analysis"
    authors: "Mainville L, Smilga AS, Fortin PR"
    year: 2022
    journal: "Journal of Cutaneous Medicine and Surgery"
  - id: "7"
    pmid: "42835758"
    title: "Oral Nicotinamide for the Secondary Prevention of Cutaneous Squamous Cell Carcinoma and Other Keratinocyte Carcinomas: A Systematic Review"
    authors: "Guerra Jiménez AL, Ortegón Garciaherreros JC, Suárez Escobar LP, Vargas Monroy LV, Madariaga Estupiñán MC"
    year: 2026
    journal: "Journal of Skin Cancer"
  - id: "8"
    pmid: "40960808"
    title: "Nicotinamide for Skin Cancer Chemoprevention"
    authors: "Breglio KF, Knox KM, Hwang J, Weiss R, Maas K, Zhang S, Yao L, Madden C, Xu Y, Hartman RI, Wheless L"
    year: 2025
    journal: "JAMA Dermatology"
  - id: "9"
    pmid: "42268603"
    title: "Cost-Effectiveness of Oral Nicotinamide for Keratinocyte Carcinoma Prevention"
    authors: "Perez D, Breglio KF, Knox KM, Pereira AC, Gaziano JM, Wheless LE, Hartman RI"
    year: 2026
    journal: "JAMA Dermatology"
  - id: "10"
    pmid: "31058986"
    title: "Effect of Sunscreen Application Under Maximal Use Conditions on Plasma Concentration of Sunscreen Active Ingredients: A Randomized Clinical Trial"
    authors: "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"
    year: 2019
    journal: "JAMA"
  - id: "11"
    pmid: "25087185"
    title: "Vitamin D and melanoma and non-melanoma skin cancer risk and prognosis: a comprehensive review and meta-analysis"
    authors: "Caini S, Boniol M, Tosti G, Magi S, Medri M, Stanganelli I, Palli D, Assedi M, Marmol VD, Gandini S"
    year: 2014
    journal: "European Journal of Cancer"
  - id: "12"
    pmid: "41542817"
    title: "European Code Against Cancer, 5th edition - ultraviolet radiation, radon and cancer"
    authors: "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"
    year: 2026
    journal: "Molecular Oncology"
  - id: "13"
    url: "https://www.fda.gov/drugs/understanding-over-counter-medicines/sunscreen-how-help-protect-your-skin-sun"
    title: "Sunscreen: How to Help Protect Your Skin from the Sun"
    authors: "U.S. Food and Drug Administration"
    year: 2026
    journal: "FDA Consumer Update"
  - id: "14"
    pmid: "17132769"
    title: "Prolonged prevention of squamous cell carcinoma of the skin by regular sunscreen use"
    authors: "van der Pols JC, Williams GM, Pandeya N, Logan V, Green AC"
    year: 2006
    journal: "Cancer Epidemiology, Biomarkers & Prevention"
---

European guidance puts limiting excessive sun exposure and never using tanning beds first [12]. Within that, daily sunscreen reduced squamous cell cancers in a randomized trial, with a fall in invasive melanoma at 10-year follow-up [1][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 stopping [4][5].

<!-- more -->

## What the research supports

### 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 sunbeds [12]. Solar UV radiation, and to a lesser extent artificial UV, are major causes of skin cancer [12]. Sunscreen is one of several tools; see [sun exposure and skin cancer](/sunlight/skin-cancer-risk-and-safe-sun) for the broader picture and [how to spot skin cancer](/skin-cancer/melanoma-and-mole-checks) 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 years [1]. Daily use reduced squamous cell cancers [14] and, over 10 years after the trial, invasive melanomas [1]. 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 tanning [2]. Which type to buy: [choosing a safe sunscreen](/sunscreen/choosing-safe-sunscreen) and [chemical versus mineral](/sunscreen/chemical-vs-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 use [10]. 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 cancer [13].

### 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 them [4]. 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 stopping [4]. In 158 transplant recipients (ONTRANS), it made no difference [5]. 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 trial [6][7][8]. This is the oral form; for skin-care uses of the topical form, see [niacinamide](/niacinamide/skin-metabolic-and-anti-inflammatory).

### 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 sun [11]. Observational data in a meta-analysis found no lower melanoma risk at higher blood vitamin D levels [11], and the European Code advises never using sunbeds [12]. For vitamin D itself, see [the sunshine vitamin](/vitamin-d/sunshine-vitamin) and [supplementation](/vitamin-d/supplementation).

<!-- research -->

## The evidence in detail

### 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 2006 [1]. 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 adults [1]. 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 significantly [14]. A 2026 JAMA review summarizes the same result, with 1,587 versus 953 cases per 100,000 person-years [3].

### Norwegian cohort

The Norwegian Women and Cancer Study followed 143,844 women aged 40 to 75 for 1,532,247 person-years, with 722 melanomas [2]. 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 directions [2].

### 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 months [4]. 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 months [4]. Adverse events did not differ, and there was no evidence of benefit after nicotinamide was discontinued [4].

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 recruitment [5]. 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 nicotinamide [6]. 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 patients [8]. 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 ones [8]. Among transplant recipients there was no overall reduction [8]. 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 evidence [9].

### 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 days [10]. Maximum plasma concentrations exceeded 0.5 ng/mL for all four products after four applications on day 1 [10]. 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 ecamsule [10]. The most common adverse event was a rash, in 1 participant per sunscreen [10]. The authors said the clinical significance is unknown and the results do not indicate that individuals should refrain from sunscreen use [10].

### 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 cancer [11]. 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 research [11]. 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 trial [1][3]. Less sure for melanoma, where the primary Nambour result narrowly missed significance and the cohort data are observational [1][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 recipients [4][5][7][8]. The advice to limit excessive sun exposure and avoid sunbeds rests on UV being an established major cause of skin cancer [12].
