Hydrogen strongly affects the properties of electronic materials. It is always electrically active, and usually counteracts the prevailing conductivity of the semiconductor. In some materials, however, hydrogen acts as a source of doping. We have developed a model that enables us to predict the electrical activity of hydrogen in any material, based on its band alignment on an absolute energy scale. We discuss the underlying physics, as well as consequences for specific materials, including ZnO and InN. (c) 2005 Elsevier B.V. All rights reserved.