Most melanocytic nevi develop on sun-exposed skin during childhood and adolescence and commonly harbor BRAF mutations or, less frequently, NRAS mutations. A small subset of nevi is present at birth, and therefore must develop independently of UV light. To assess whether these nevi have a different mutation spectrum than those that develop on sun-exposed skin, we determined the BRAF and NRAS mutation frequencies in 32 truly congenital nevi. We found no BRAF mutations, but 81% (26/32) harbored mutations in NRAS. Consistently, seven of 10 (70%) proliferating nodules that developed early in life in congenital nevi showed mutations in NRAS. A separate set of nevi that displayed histological features frequently found in nevi present at birth ("congenital pattern nevi") but lacked a definitive history of presence at birth showed an inverse mutation pattern with common BRAF mutations (20/28 or 71%) and less frequent NRAS mutations (7/28 or 25%). Thus, nevi that develop in utero are genetically distinct from those that develop later, and histopathologic criteria alone are unable to reliably distinguish the two groups. The results are consistent with the finding in melanoma that BRAF mutations are uncommon in neoplasms that develop in the absence of sun-exposure.