Melanoma heritability is among the highest for cancer and single nucleotide polymorphisms (SNPs) contribute to it. To date, only SNPs that reached statistical significance in genome-wide association studies or few candidate SNPs have been included in melanoma risk prediction models. We compared four approaches for building polygenic risk scores (PRS) using 12\ 874 melanoma cases and 23\ 203 controls from Melanoma Meta-Analysis Consortium as a training set, and newly genotyped 3102 cases and 2301 controls from the MelaNostrum consortium for validation. We estimated adjusted odds ratios (ORs) for melanoma risk using traditional melanoma risk factors and the PRS with the largest area under the receiver operator characteristics curve (AUC). We estimated absolute risks combining the PRS and other risk factors, with age- and sex-specific melanoma incidence and competing mortality rates from Italy as an example. The best PRS, including 204 SNPs (AUC\ =\ 64.4\%; 95\% confidence interval (CI)\ =\ 63-65.8\%), developed using winner{\textquoteright}s curse estimate corrections, had a per-quintile OR\ =\ 1.35 (95\% CI\ =\ 1.30-1.41), corresponding to a 3.33-fold increase comparing the 5th to the 1st PRS quintile. The AUC improvement by adding the PRS was up to 7\%, depending on adjusted factors and country. The 20-year absolute risk estimates based on the PRS, nevus count and pigmentation characteristics for a 60-year-old Italian man ranged from 0.5 to 11.8\% (relative risk \ =\ 26.34), indicating good separation.