Density functional calculations are performed to study the interaction of molecular and atomic hydrogen with (5,5) and (6,6) single-wall carbon nanotubes. Molecular physisorption is predicted to be the most stable adsorption state, with the molecule at equilibrium at a distance of 5-6 a.u. from the nanotube wall. The physisorption energies outside the nanotubes are approximately 0.07 eV, and larger inside, reaching a value of 0.17 eV inside the (5,5) nanotube. Although these binding energies appear to be lower than the values required for an efficient adsorption/desorption operation at room temperature and normal pressures, the expectations are better for operation at lower temperatures and higher pressures, as found in many experimental studies. A chemisorption state with the molecule dissociated has also been found, with the H atoms much closer to the nanotube wall. However, this state is separated from the physisorption state by an activation barrier of 2 eV or more. The dissociative chemisorption weakens carbon-carbon bonds, and the concerted effect of many incoming molecules with sufficient kinetic energies can lead to the scission of the nanotube.