Inborn errors of metabolism that may lead to calculus formation within the urinary tract include: adenine phosphoribosyltransferase deficiency, xanthine oxidase deficiency, orotic aciduria (acidosis) type I and alkaptonuria. All of them are autosomal recessive diseases. Adenine phosphoribosyltransferase deficiency and xanthine oxidase deficiency (congenital xanthinuria) are defects of purine metabolism, which lead to the formation of calculi composed of 2,8-dihydroxyadenine and xanthine. Xanthinuria is accompanied by hypouricaemia and hypouricosuria. Treatment involves a low-purine diet, abundant fluid administration and allopurinol (in adenine phosphoribosyltransferase deficiency) and alkalisation of urine (in xanthinuria). Orotic aciduria type I is a pyrimidine metabolism defect that manifests with failure to thrive, developmental delay, megaloblastic anaemia, immunodeficiency, skin appendage disorders and excessive excretion of orotic acid with urine. Nephrolithiasis is a rare manifestation of this disease. Treatment involves uridine and haematopoietic drugs. Alkaptonuria is a defect of tyrosine metabolism whereby homogentisate is deposited in tissues. It manifests with connective tissue pigmentation (ochronosis), osteoarthritis, calcifications in the coronary arteries, heart valve damage, pigmentation of the sclera and urolithiasis. Treatment involves nitisinone, vitamin C and dietary restriction of tyrosine and phenylalanine. Melamine urolithiasis is a consequence of crystallisation of melamine (cyanuramide), which was illegally added to infant formulas in China. Melamine stones were spontaneously evacuated from the urinary tract, but some patients developed irreversible renal changes. Moreover, certain drugs may also crystallise in the kidneys. These include aciclovir, indinavir, atanavir, sulphadiazine, triamterene, methotrexate, orlistat, ciprofloxacin and ceftriaxone. Prevention and treatment of this form of nephrolithiasis mostly consist in the administration of a large quantity of fluids.