We have performed first-principles calculations of hydrogen doping in anatase TiO2. Neutral and charged defects in interstitial and substitutional (for oxygen) positions have been considered, at concentrations between 0.125 and 0.03125 nH/nTi. A region of stability has been found for positively charged interstitial hydrogen, at realistic conditions of temperature and pressure. For example, at a partial pressure of hydrogen of 0.01 atm and a Fermi energy 2.3 eV above the top of the valence band, this defect is stable up to ∼500 K. Remarkably, at the highest concentration, metastable ordered substitutional neutral hydrogen leads to the appearance of bandlike states at the bottom of the conduction band, which lead to a band gap narrowing by 1 eV. On the contrary, in the presence of disorder or at lower concentration the neutral defects yield only localized defect states, located 0.7–0.9 eV below the bottom of the conduction band. Finally, the electronic structure of charged defects is very similar to that of pure anatase. These results explain the discrepancies observed in experiments as due to different concentrations and charge states, and suggest that a high concentration of neutral hydrogen in oxygen vacancies could be of interest for photocatalytic applications.