The folate-driven one-carbon (1C) cycle is a fundamental metabolic hub in cells that enables the synthesis of nucleotides and amino acids and epigenetic modifications. This cycle might also release formaldehyde, a potent protein and DNA crosslinking agent that organisms produce in substantial quantities. Here we show that supplementation with tetrahydrofolate, the essential cofactor of this cycle, and other oxidation-prone folate derivatives kills human, mouse and chicken cells that cannot detoxify formaldehyde or that lack DNA crosslink repair. Notably, formaldehyde is generated from oxidative decomposition of the folate backbone. Furthermore, we find that formaldehyde detoxification in human cells generates formate, and thereby promotes nucleotide synthesis. This supply of 1C units is sufficient to sustain the growth of cells that are unable to use serine, which is the predominant source of 1C units. These findings identify an unexpected source of formaldehyde and, more generally, indicate that the detoxification of this ubiquitous endogenous genotoxin creates a benign 1C unit that can sustain essential metabolism.