Dendritic spines are the primary site of excitatory synaptic input onto neurons, and are biochemically isolated from the parent dendritic shaft by their thin neck. However, due to the lack of direct electrical recordings from spines, the influence that the neck resistance has on synaptic transmission, and the extent to which spines compartmentalize voltage, specifically excitatory postsynaptic potentials, albeit critical, remains controversial. Here, we use quantum-dot-coated nanopipette electrodes (tip diameters ?15-30?nm) to establish the first intracellular recordings from targeted spine heads under two-photon visualization. Using simultaneous somato-spine electrical recordings, we find that back propagating action potentials fully invade spines, that excitatory postsynaptic potentials are large in the spine head (mean 26?mV) but are strongly attenuated at the soma (0.5-1?mV) and that the estimated neck resistance (mean 420?M?) is large enough to generate significant voltage compartmentalization. Nanopipettes can thus be used to electrically probe biological nanostructures.