Developmental deconvolution of complex organs and tissues at the level of individual cells remains challenging. Non-invasive genetic fate mapping1has been widely used, but the low number of distinct fluorescent marker proteins limits its resolution. Much higher numbers of cell markers have been generated using viral integration sites2, viral barcodes3, and strategies based on transposons4and CRISPR–Cas9 genome editing5; however, temporal and tissue-specific induction of barcodesin situhas not been achieved. Here we report the development of an artificial DNA recombination locus (termedPolylox) that enables broadly applicable endogenous barcoding based on the Cre–loxPrecombination system6,7.Polyloxrecombinationin situreaches a practical diversity of several hundred thousand barcodes, allowing tagging of single cells. We have used this experimental system, combined with fate mapping, to assess haematopoietic stem cell (HSC) fatesin vivo. Classical models of haematopoietic lineage specification assume a tree with few major branches. More recently, driven in part by the development of more efficient single-cell assays and improved transplantation efficiencies, different models have been proposed, in which unilineage priming may occur in mice and humans at the level of HSCs8,9,10. We have introduced barcodes into HSC progenitors in embryonic mice, and found that the adult HSC compartment is a mosaic of embryo-derived HSC clones, some of which are unexpectedly large. Most HSC clones gave rise to multilineage or oligolineage fates, arguing against unilineage priming, and suggesting coherent usage of the potential of cells in a clone. The spreading of barcodes, both after induction in embryos and in adult mice, revealed a basic split between common myeloid–erythroid development and common lymphocyte development, supporting the long-held but contested view of a tree-like haematopoietic structure.