Although genetic studies have found an inverse relationship between vitiligo and skin cancer, epidemiological evidence is conflicting. We investigated the risk of skin cancer in adults with vitiligo using United Kingdom electronic primary care records from the Optimum Patient Care Research Database 2010-2020. Vitiligo cases were age, sex, and general practitioner practice matched to population controls without vitiligo. Incidence of melanoma, nonmelanoma skin cancers (squamous cell carcinoma and basal cell carcinoma), and actinic keratoses was compared between vitiligo cases and controls using Cox regression. A total of 15,156 vitiligo cases were matched to 60,615 controls. Vitiligo was associated with a 38% reduced risk of new-onset skin cancer (adjusted hazard ratio [aHR] = 0.62, 95% confidence interval [CI] = 0.52-0.75, P < 0.001) and skin cancer subtypes; melanoma (aHR = 0.39, 95% CI = 0.23-0.65, P < 0.001), squamous cell carcinoma (aHR = 0.67, 95% CI = 0.49-0.90, P < 0.01), basal cell carcinoma (aHR = 0.65, 95% CI = 0.51-0.83, P < 0.001). There was no significant association for actinic keratosis (aHR = 0.88, 95% CI = 0.77-1.01). People with vitiligo have a markedly reduced incidence of melanoma and nonmelanoma skin cancer. Given concerns that some treatments, such as phototherapy, may increase skin cancer risk, this finding provides reassurance to people with vitiligo and clinicians managing the condition.