We present a near-infrared study of the stellar content of 35 HII regions in the Galactic plane, 24 of which have been classified as giant H ii regions. We have selected these optically obscured star-forming regions from the catalogues of Russeil (2003, Cat. J/A+A/397/133), Conti & Crowther (2004MNRAS.355..899C) and Bica et al. (2003, Cat. J/A+A/404/223). In this paper, we have used the near-infrared domain J-, H- and Ks-band colour images to visually inspect the sample. Also, we have used colour-colour and colour-magnitude diagrams to indicate ionizing star candidates, as well as the presence of young stellar objects such as classical T Tauri stars and massive young stellar objects (MYSOs). We have obtained Spitzer Infrared Array Camera images for each region to help further characterize them. Spitzer and near-infrared morphology were used to place each cluster in an evolutionary phase of development. Spitzer photometry was also used to classify the MYSOs.