What Causes Skin Cancer? UV Rays, Genes, and More

Skin cancer is primarily caused by ultraviolet (UV) radiation damaging the DNA inside skin cells. When this damage accumulates faster than your body can repair it, cells begin growing out of control. But UV exposure isn’t the only cause. Genetics, certain chemicals, viral infections, and a weakened immune system all play roles, sometimes independently of sun exposure.

How UV Radiation Damages Skin Cell DNA

Sunlight contains two types of UV radiation that reach your skin, and each one causes harm differently. UVB rays, the ones responsible for sunburns, hit the top layers of skin and directly alter DNA by fusing together adjacent building blocks in the genetic code. These fused sections, called pyrimidine dimers, are the signature fingerprint of sun-induced mutations. When your cells try to copy damaged DNA during normal division, errors slip in. The most common is a specific letter swap in the genetic code that shows up repeatedly in skin cancer tumor genomes.

UVA rays have a longer wavelength and penetrate deeper into the skin. Rather than damaging DNA directly, UVA generates reactive oxygen species, essentially unstable molecules that attack DNA, proteins, and cell membranes from the inside. UVA also produces a less common but particularly insidious form of damage: DNA lesions that continue forming for hours after you’ve gone indoors. These “dark” lesions arise because UVA activates a chain reaction involving melanin pigment and other molecules that keeps damaging DNA well after the UV exposure has ended. This process is especially active in cells that contain pheomelanin, the type of pigment found in people with red hair and fair skin.

Melanin-producing skin cells are uniquely vulnerable. When researchers compared DNA damage in different skin cell types after the same UV dose, the pigment-producing cells accumulated roughly twice the level of oxidative DNA damage as the surrounding cells. This helps explain why melanoma, the most dangerous form of skin cancer, originates specifically in these cells.

Sunburns, Tanning Beds, and Cumulative Exposure

Not all UV exposure carries the same risk profile. Intense, intermittent burns, the kind you get on a beach vacation after months indoors, are strongly linked to melanoma. Cumulative, day-after-day exposure over years is more closely tied to the non-melanoma skin cancers: basal cell carcinoma and squamous cell carcinoma. Both patterns matter, but they tend to produce different types of cancer in different locations on the body.

Indoor tanning dramatically accelerates this process. A meta-analysis found that using tanning beds before age 35 increases melanoma risk by 59 percent, squamous cell carcinoma risk by 67 percent, and basal cell carcinoma risk by 29 percent. Tanning beds emit concentrated UV radiation, often with a heavy UVA component, delivering a high dose in a short session. The World Health Organization classifies tanning devices as a Group 1 carcinogen, the same category as tobacco smoke.

Genetic Factors That Raise Your Risk

Your genes influence skin cancer risk in ways that go beyond just determining your skin color. The MC1R gene controls the type of melanin your skin produces. Some people carry variants of this gene that reduce its function, shifting melanin production toward pheomelanin (the reddish-yellow pigment) and away from eumelanin (the darker, more protective pigment). This is why red hair and fair skin are associated with higher cancer risk, but the gene variants themselves are an independent risk factor even when researchers control for skin tone and hair color.

People carrying two variant copies of the MC1R gene have roughly 3.8 times the risk of squamous cell carcinoma and 2.3 times the risk of basal cell carcinoma compared to people with two normal copies. Carrying just one variant copy cuts that added risk roughly in half. These elevated risks hold true regardless of whether someone actually has fair skin or red hair, meaning the gene is doing something beyond just determining pigmentation. It likely affects how well cells repair UV-damaged DNA and how the immune system responds to abnormal cells in the skin.

Chemical and Environmental Carcinogens

Several workplace and environmental chemicals cause skin cancer through mechanisms unrelated to UV radiation. Arsenic is one of the best-documented. Long-term exposure through contaminated drinking water or occupational contact can cause distinctive skin cancers, sometimes appearing decades after the exposure. Arsenic disrupts DNA repair pathways and promotes abnormal cell growth in ways that compound any existing UV damage.

Coal tar and coal-tar pitch are also established skin carcinogens. They contain numerous cancer-causing compounds, including benzene, and exposure occurs through skin absorption, inhalation, or ingestion. Workers in coke production, aluminum smelting, foundries, and roofing face elevated risk. Even coal-tar-based paints, enamels, and coatings can contribute to occupational exposure over time.

Viral Infections and Skin Cancer

Human papillomavirus (HPV) plays a role in some skin cancers, particularly squamous cell carcinoma. HPV specifically infects squamous cells, the flat cells that make up the outer layer of skin and line many internal surfaces. Of the more than 200 HPV types, 12 are classified as high-risk for cancer, with HPV 16 and HPV 18 responsible for the majority of HPV-related cancers. While HPV is more commonly associated with cervical and throat cancers, it contributes to skin cancers as well, especially in people whose immune systems are compromised.

Immunosuppression and Transplant Recipients

A weakened immune system is one of the strongest non-UV risk factors for skin cancer. Your immune system constantly surveys the body for abnormal cells and destroys them before they can form tumors. When that surveillance system is suppressed, whether by medication, disease, or other factors, damaged skin cells are far more likely to survive and multiply.

The clearest evidence comes from organ transplant recipients, who take immunosuppressive drugs for life to prevent rejection. In a study of over 10,000 Canadian transplant recipients, nearly 17 percent developed a skin cancer after a median of about four years post-transplant. Their overall skin cancer rate was nearly seven times higher than the general population. The risk climbs with each additional year on immunosuppressive therapy, and squamous cell carcinoma, normally less common than basal cell carcinoma, becomes the dominant type in this group.

When Sun Damage Becomes Precancerous

Skin cancer rarely appears out of nowhere. One of the most common warning signs is actinic keratosis: rough, scaly patches that develop on sun-exposed areas like the face, scalp, forearms, and backs of the hands. These are considered precancerous because a fraction of them progress to invasive squamous cell carcinoma. Published estimates of that progression rate vary widely, from less than 0.1 percent to 16 percent per year for any individual lesion, with an average around 8 to 10 percent across studies.

The challenge is that no one can predict which specific patch will progress and which will remain harmless or even resolve on its own. This is why dermatologists typically treat actinic keratoses rather than watch them. The presence of multiple lesions also signals that the surrounding skin has sustained significant cumulative UV damage, raising the overall risk that new cancers could develop nearby.