Electrochemical capacitors, also called supercapacitors, store energy using either ion adsorption (electrochemical double layer capacitors) or fast surface redox reactions (pseudo-capacitors). They can complement or replace batteries in electrical energy storage and harvesting applications, when high power delivery or uptake is needed. A notable improvement in performance has been achieved through recent advances in understanding charge storage mechanisms and the development of advanced nanostructured materials. The discovery that ion desolvation occurs in pores smaller than the solvated ions has led to higher capacitance for electrochemical double layer capacitors using carbon electrodes with subnanometre pores, and opened the door to designing high-energy density devices using a variety of electrolytes. Combination of pseudo-capacitive nanomaterials, including oxides, nitrides and polymers, with the latest generation of nanostructured lithium electrodes has brought the energy density of electrochemical capacitors closer to that of batteries. The use of carbon nanotubes has further advanced micro-electrochemical capacitors, enabling flexible and adaptable devices to be made. Mathematical modelling and simulation will be the key to success in designing tomorrow's high-energy and high-power devices.