Abstract Polycrystalline titania and Nb:TiO 2 thin films were deposited by RF magnetron sputtering. The influence of post-deposition annealing in vacuum and hydrogen atmosphere on the structure, morphology, oxidation states and optical properties was studied by X-ray diffraction, atomic force microscopy, XPS and UV–VIS spectroscopy. The heat treatment of titanium dioxide thin films in vacuum and H 2 atmosphere induces structural and morphological changes. The band gap narrowing was observed for the transparent as-deposited Nb:TiO 2 films, while annealing at 420 °C in H 2 atmosphere resulted in an enhancement of the electrical conductivity. Further on, TiO 2 / p -CdTe photovoltaic devices with efficiency of 1.8% were fabricated and their characteristic ‘enhancement’ is discussed.