Hydrogen peroxide (H
2O
2) is an effective green oxidant, which is used in many industrial processes. Here, the reaction mechanism for direct formation of H
2O
2 from H
2 and O
2 over Pd catalysts is studied by using density functional theory calculations and mean-field kinetic modeling. The state of the catalyst under various conditions is determined from ab initio thermodynamics. It is found that Pd is in a hydride phase during typical reaction conditions. Reaction landscapes are constructed for the reaction over PdH(111) and PdH(211). Formation of H
2O
2 instead of H
2O requires that O
2 adsorbs and that the surface intermediates O
2, OOH and H
2O
2 do not dissociate. We find that these requirements are fullled on the stepped PdH(211) surface. A stepped surface is needed for O
2 chemisorption as the adsorption on PdH(111) is endothermic. The high H coverage on the surface of the hydride is important to slow down the unwanted scission of the O-O bond and promote the desorption of the products. Our findings demonstrate the importance of surface steps and high hydrogen coverage for direct synthesis of H
2O
2 from H
2 and O
2 over Pd catalysts. The results imply that the selectivity of the reaction towards H
2O
2 is enhanced by a high partial pressure of H
2, which agrees with experimental observations
Reaction cycle for direct H2O2 formation over the stepped PdH(211)