A commercial fuel cell has been successfully modified to carry out X-ray absorption spectroscopy (XAS) measurements under optimized in operando conditions. The design is conceived for the performance of XAS experiments in transmission mode over a wide range of X-ray energies above 6 keV, owing to the reduced absorption of the cell. The wide angular aperture allows the collection of XAS in fluorescence mode and of X-ray diffraction patterns when needed. Details of the design of the cell and its performances are given. The quality of the extended X-ray absorption fine-structure spectra under working conditions has been verified at the ESRF and ELETTRA synchrotron radiation facilities, showing that relatively fast and low-noise transmission measurements on electrodes over a wide range of catalyst concentrations and energies are feasible.