SrTiO3 is a promising photocatalyst for the production of hydrogen from water splitting under solar light. Cr doping is an effective treatment for adjusting its absorption edge to the visible-light range, although the performance of Cr-doped SrTiO3 is strongly affected by the oxidation number of the Cr ions. In this study, we theoretically predict that elevating the Fermi level, i.e., n-type carrier doping in SrTiO3, can stabilize the desirable oxidation number of chromium (Cr3+), contributing to a higher activity for H2 evolution. Our computational results, based on hybrid density-functional calculations, reveal that such an n-type condition is realized by substituting group-V metals (Ta, Sb, and Nb), group-III metals (La and Y), and fluorine atoms for the Ti, Sr, and O sites in SrTiO3, respectively. From our systematic study of the capability of each dopant, we conclude that La is the most effective donor for stabilizing Cr3+. This prediction is successfully evidenced by experiments showing that the La and Cr codoped SrTiO3 dramatically increases the amount of H2 gas evolved from water under visible-light irradiation, which demonstrates that our guiding principle based on Fermi level tuning by the codoping scheme is valid for the design of advanced photocatalysts.