Nanostructured Er3+ doped TiO2 thin films are deposited onto glass substrate via sol-gel dip-coating followed by calcination at 450 °C for 1 h. X-ray diffraction analysis confirms that the films crystallized within single tetragonal anatase phase. Atomic force microscopy observations reveal that the surface of pure TiO2 is characterized by ninepins then becomes smooth and porous for Er-doped TiO2 thin films, while the roughness decreases drastically from 17.2 to 2.6 nm with increasing Er3+ percentage. Wettability tests show a super-hydrophilicity character of 0.2 and 0.3%Er doped TiO2 thin films. UV-vis analysis reveals high transmittance above 85% with the presence of interferences indicating the high quality of films. Meanwhile, the energy band gap decreases slightly from 3.31 eV for un-doped to 3.26 eV for 0.4%Er, with a red-shift in the optical absorption edge. High photocatalytic activity using methylene blue indicator has been achieved for 0.2% Er3+-TiO2 thin film, reaching 95% for 3 h. © 2018 IOP Publishing Ltd.