This paper considers the definition and properties of Wannier functions for Bloch electrons in a magnetic field. When the quantized Hall conductance of a band is non-zero, conventional Wannier functions with good localization properties cannot be constructed. The difficulty can be overcome by slightly broadening the definition of the Wannier function: the generalized Wannier functions are a good basis set, and well localized. They are generated by applying magnetic translations to a set of |N| fundamental Wannier states: if the number of flux quanta per unit cell is (a rational number), and the Hall conductance integer is M, then N satisfies Mq + Np = 1. Unlike conventional Wannier functions, the definition of these Wannier states depends upon the choice of the basis vectors for lattice translations. The paper gives the transformation properties of the Wannier functions induced by reassignment of the primitive-lattice basis vectors.