The chemistry of oxygen, hydrogen, water, and other species containing both oxygen and hydrogen atoms on the anatase TiO2 (001) surface is investigated by DFT. The adsorption energy of atoms and radicals depends appreciably on the position and mode of adsorption, and on the coverage. Molecular hydrogen and oxygen interact weakly with the clean surface. However, H2O dissociates spontaneously to give two nonidentical hydroxyl groups, and this provides a model for hydroxylation of TiO2 surfaces by water. The mobility of the hydroxyl groups created by water splitting is initially impeded by a diffusion barrier close to 1 eV. The O2 adsorption energy increases significantly in the presence of H atoms. Hydroperoxy (OOH) formation is feasible if at least two H atoms are present in the direct vicinity of O2. In the adsorbed OOH, the OO bond is considerably lengthened and thus weakened.