In this thesis electrocatalysts for the oxygen reduction reaction (ORR) and the oxygen evolution reaction (OER) have been investigated using synchrotron based X-ray diffraction and X-ray absorption spectroscopy methods. The catalysts are based on Pt alloys and RuO2 for ORR and OER, respectively. For ORR model systems of PtxGd and PtxY alloys were fabricated. EXAFS were measured on a range of size-selected PtxGd nanoparticles to determine the interatomic Pt-Pt distances. The larger particles with a diameter of 8 nm were most active with a mass activity of 3.5 A/mgPt, and these particles also showed the greatest compression of the Pt-Pt nearest neighbor distance. This is consistent with the formation of a pure Pt overlayer that is compressed relative to bulk Pt, which explains the increase in activity purely due to strain effects. The activity of the different sized nanoparticles was correlated to the compression; the smaller particles are less active and has a lower degree of compression.To get more insight into the Pt overlayer single crystal model systems of Gd/Pt(111) and Y/Pt(111) were fabricated by depositing films of Gd or Y on a Pt(111) single crystal at high temperatures in UHV. XRD measurements on both model systems showed the formation of an FCC-like overlayer about 3 atomic layers thick on Y/Pt(111) and about 5 layers thick on Gd/Pt(111). The average in-plane compression on the two systems were 1.4% and 0.31% respectively. The XRD analysis also revealed a possible high degree of micro-strain, which can explain why both model systems have similar ORR activity despite their large difference in average compression.An in-situ XRD study of Gd/Pt(111) showed that the overlayer forms immediately upon exposure to acidic electrolyte at open circuit potential. Furthermore stabilitymeasurements showed that the in-plane compression relaxes during the first 2000-3000 cycles, explaining the loss of activity primarily in this range of cycling.For OER mass-selected nanoparticles of metallic Ru and thermally oxidized RuO2 were fabricated. Both materials are highly active for OER, although the metallic Ru nanoparticles exceptionally so. However this comes as a trade-off in stability, as the metallic particles dissolves rapidly at OER conditions. In an in-situ XAS experiment the oxidation state of the nanoparticles were tracked as a function of potential. It was found that the metallic nanoparticles strongly oxidize around 1.1 V vs. RHE. Furthermore, from the measurements of both types of nanoparticles we hypothesize that RuO2 binds O too strongly, as an increase in potential leads to further oxidation of Ru. As a consequence of too strong binding of O, the oxidation state of Ru decrease during OER as the coverage of O intermediates are no longer based on thermodynamics but rather kinetics.Finally an IrO2 protection layer on a RuO2 thin film catalyst was investigated using high resolution XAS. It was found that the stability of the RuO2 thin film could be improved by adding small amounts of IrO2 on the surface. With in-situ XAS measurements we were able to measure the oxidation state of Ir as a function of applied potential. It was found that the IrO2 does not participate in the OER, but sits at the surface and takes up oxygen by increasing its oxidation state.