Urolithiasis affects approximately 10% of individuals in Western societies by the seventh decade of life. The most common form, idiopathic calcium oxalate urolithiasis, results from the interaction of multiple genes and their interplay with dietary and environmental factors. To date, considerable progress has been made in identifying the metabolic risk factors that predispose to this complex trait, among which hypercalciuria predominates. The specific genetic and epigenetic factors involved in urolithiasis have remained less clear, partly owing to the candidate gene and linkage methods that have been available until now, being inherently low in their power of resolution and in assessing modest effects in complex traits. However, together with investigations of rare, Mendelian forms of urolithiasis associated with various metabolic risk factors, these methods have afforded insights into biological pathways that seem to underlie the development of stones in the urinary tract. Monogenic diseases account for a greater proportion of stone formers in children and adolescents than in adults. Early diagnosis of monogenic forms of urolithiasis is of importance owing to associated renal injury and other potentially treatable disease manifestations, but diagnosis is often delayed because of a lack of familiarity with these rare disorders. In this Review, we will discuss advances in the understanding of the genetics underlying polygenic and monogenic forms of urolithiasis.