Molecular barcoding technologies that uniquely identify single cells are hampered by limitations in barcode measurement. Readout by sequencing does not preserve the spatial organization of cells in tissues, whereas imaging methods preserve spatial structure but are less sensitive to barcode sequence. Here we introduce a system for image-based readout of short (20-base-pair) DNA barcodes. In this system, called Zombie, phage RNA polymerases transcribe engineered barcodes in fixed cells. The resulting RNA is subsequently detected by fluorescent in situ hybridization. Using competing match and mismatch probes, Zombie can accurately discriminate single-nucleotide differences in the barcodes. This method allows in situ readout of dense combinatorial barcode libraries and single-base mutations produced by CRISPR base editors without requiring barcode expression in live cells. Zombie functions across diverse contexts, including cell culture, chick embryos and adult mouse brain tissue. The ability to sensitively read out compact and diverse DNA barcodes by imaging will facilitate a broad range of barcoding and genomic recording strategies.