Methods for highly multiplexed RNA imaging are limited in spatial resolution and thus in their ability to localize transcripts to nanoscale and subcellular compartments. We adapt expansion microscopy, which physically expands biological specimens, for long-read untargeted and targeted in situ RNA sequencing. We applied untargeted expansion sequencing (ExSeq) to the mouse brain, which yielded the readout of thousands of genes, including splice variants. Targeted ExSeq yielded nanoscale-resolution maps of RNAs throughout dendrites and spines in the neurons of the mouse hippocampus, revealing patterns across multiple cell types, layer-specific cell types across the mouse visual cortex, and the organization and position-dependent states of tumor and immune cells in a human metastatic breast cancer biopsy. Thus, ExSeq enables highly multiplexed mapping of RNAs from nanoscale to system scale.