The last decade has seen an intensified interest in the development and use of electrochemical double-layer capacitors, fuelled by the availability of new electrode materials. The use of nanoporous carbons, in particular, with extremely high surface areas for ion adsorption has enabled the development of working devices with significantly increased capacitances that have become viable alternatives to lithium-ion batteries in certain applications. An understanding of the charge storage mechanism and the ion dynamics inside the nanopores is only just emerging, with the most compelling evidence coming from simulation. Here we present the first in situ magnetic resonance imaging experiments of electrochemical double-layer capacitors. These experiments overcome the limitations of other techniques and give spatially resolved chemical information about the electrolyte ions in real time for a working capacitor of standard geometry. The results provide insight into the predominant capacitive processes occurring at different states of charge and discharge.