Dendritic spines receive the majority of excitatory inputs in many mammalian neurons, but their biophysical properties and exact role in dendritic integration are still unclear. Here, we study spine electrical properties in cultured hippocampal neurons using an improved genetically encoded voltage indicator (ArcLight) and two-photon glutamate uncaging. We find that back-propagating action potentials (bAPs) fully invade dendritic spines. However, uncaging excitatory post-synaptic potentials (uEPSPs) generated by glutamate photorelease, ranging from 4 to 27 mV in amplitude, are attenuated by up to 4-fold as they propagate to the parent dendrites. Finally, the simultaneous occurrence of bAPs and uEPSPs results in sublinear summation of membrane potential. Our results demonstrate that spines can behave as electric compartments, reducing the synaptic inputs injected into the cell, while receiving bAPs are unmodified. The attenuation of EPSPs by spines could have important repercussions for synaptic plasticity and dendritic integration.