The balance between excitatory and inhibitory (E and I) synapses is thought to be critical for information processing in neural circuits. However, little is known about the spatial principles of E and I synaptic organization across the entire dendritic tree of mammalian neurons. We developed a new open-source reconstruction platform for mapping the size and spatial distribution of E and I synapses received by individual genetically-labeled layer 2/3 (L2/3) cortical pyramidal neurons (PNs) invivo. We mapped over 90,000 E and I synapses across twelve L2/3 PNs and uncovered structured organization of E and I synapses across dendritic domains as well as within individual dendritic segments. Despite significant domain-specific variation in the absolute density of E and I synapses, their ratio is strikingly balanced locally across dendritic segments. Computational modeling indicates that this spatially precise E/I balance dampens dendritic voltage fluctuations and strongly impacts neuronal firing output.