Towards the development of a useful mechanism for hydrogen storage, we have studied the hydrogenation of single-walled carbon nanotubes with atomic hydrogen using core-level photoelectron spectroscopy and x-ray absorption spectroscopy. We find that atomic hydrogen creates C-H bonds with the carbon atoms in the nanotube walls, and such C-H bonds can be completely broken by heating to 600 degrees C. We demonstrate approximately 65 +/- 15 at % hydrogenation of carbon atoms in the single-walled carbon nanotubes, which is equivalent to 5.1 +/- 1.2 wt % hydrogen capacity. We also show that the hydrogenation is a reversible process.