context: Nowadays, a variety of multifunctional electrocatalysts are being developed while there is still a lack of suitable design to fully realize their multifunctionalities. Here, we propose a general, simple, two-component design of an electrolyser to replace the traditional three-component design for decoupled water splitting. Trifunctional (OER, HER and ORR) electrocatalysts (such as nickel sulfide foams with surface grown N-doped carbon nanotube arrays) are used as the gas evolution electrode to replace both the cathode and the anode, while materials with suitable redox activities (NaTi2(PO4)3 or commercial Ni(OH)2) are used as the relay electrode. In such a design, the H2/O2 evolution can be switched by reversing the current polarity, and the ORR before the HER consumes the residual O2 left in the electrolyser, guaranteeing the high purity (∼99.9%) of the as-obtained H2. With NaTi2(PO4)3 as the relay electrode and the nickel sulfide foam as the gas evolution electrode, owing to the high decoupling efficiency of the NaTi2(PO4)3 relay (97%) and the low HER/OER overpotentials of the trifunctional nickel sulfide foam, an energy conversion efficiency of up to 94.3% can be obtained for the as-assembled electrolyser at a current density of 10 mA cm−2. When combined with a commercial Si PV module with an efficiency of 14.4%, the as-designed PV-electrolysis system showed a solar-to-hydrogen conversion efficiency of up to 10.4%. Utilization of trifunctional electrocatalysts greatly reduces the complexity of the electrolyser and the overall cost for electrochemical H2 production, and these electrolysers may potentially be used to construct highly competitive water splitting systems for continuous H2 production and green energy harvesting. Our research may also bring new insights into the utilization of multifunctional electrocatalysts in other devices, such as metal–air batteries and fuel cells.