a, Schematic illustration of MXene structure. MXenes possess excellent conductivity owing to a conductive carbide core along with transition metal oxide-like surfaces. Intercalated water molecules enable high accessibility of protons to the redox-active sites. b, SEM image of Ti3C2Tx MXene hydrogel cross-section. c, SEM image of macroporous templated Ti3C2Tx electrode cross-section. Scale bars, 5 μm. Insets in b and c show schematically the ionic current pathway in electrodes of different architectures.