Context. We study the convection zones in the outer envelope of hot massive stars which are caused by opacity peaks associated with iron and helium ionization. Aims. We determine the occurrence and properties of these convection zones as function of the stellar parameters. We then confront our results with observations of OB stars. Methods. A stellar evolution code is used to compute a grid of massive star models at different metallicities. In these models, the mixing length theory is used to characterize the envelope convection zones. Results. We find the iron convection zone (FeCZ) to be more prominent for lower surface gravity, higher luminosity and higher initial metallicity. It is absent for luminosities below about 10(3.2) L(circle do...