Conventional production of hydrogen requires large industrial plants to minimize energy losses and capital costs associated with steam reforming, water–gas shift, product separation and compression. Here we present a protonic membrane reformer (PMR) that produces high-purity hydrogen from steam methane reforming in a single-stage process with near-zero energy loss. We use a BaZrO3-based proton-conducting electrolyte deposited as a dense film on a porous Ni composite electrode with dual function as a reforming catalyst. At 800 °C, we achieve full methane conversion by removing 99% of the formed hydrogen, which is simultaneously compressed electrochemically up to 50 bar. A thermally balanced operation regime is achieved by coupling several thermo-chemical processes. Modelling of a small-scale (10 kg H2 day−1) hydrogen plant reveals an overall energy efficiency of >87%. The results suggest that future declining electricity prices could make PMRs a competitive alternative for industrial-scale hydrogen plants integrating CO2 capture.