Electrochemical two-electron water oxidation is a promising route for renewable and on-site H2O2 generation as an alternative to the anthraquinone process. However, it is currently restricted by low selectivity due to strong competition from the traditional four-electron oxygen evolution reaction, as well as large overpotential and low production rates. Here we report an interfacial engineering approach, where by coating the catalyst with hydrophobic polymers we confine in situ produced O2 gas to tune the water oxidation reaction pathway. Using carbon catalysts as a model system, we show a significant increase of the intrinsic H2O-to-H2O2 selectivity and activity compared to that of the pristine catalyst. The maximal H2O2 Faradaic efficiency was enhanced by sixfold to 66% with an overpotential of 640 mV, under which a H2O2 production rate of 23.4 µmol min−1 cm−2 (75.2 mA cm−2 partial current) was achieved. This approach was successfully extended to nickel metal, demonstrating the wide applicability of our local gas confinement concept.