Titanium dioxide (TiO2) thin films were synthesized by sol–gel process followed by post-deposition heat treatment using rapid thermal annealing (RTA) to improve the film quality. TiO2 thin films were annealed at various temperatures ranging from 500 to 900 °C for 1–10 min in air and oxygen ambient. The uniform distribution of grains has been studied by analyzing field emission scanning electron microscope micrographs. The structural studies were carried out by X-ray diffraction and Raman spectroscopy technique which have confirmed the presence of anatase and rutile phase after annealing at 700 °C. The maximum values of oxide charge density (Qox) and interface charge density (Dit) were calculated as 2.58 × 1012 cm−2 and 2.31 × 1012 eV−1 cm−2 at 900 °C and 2.19 × 1012 cm−2 and 1.53 × 1012 eV−1 cm−2 at 700 °C, for 10 min annealing duration in air ambient, respectively. The resistive switching studies have shown better switching performance at 700 °C for 10 min in air ambient with current on/off ratio of 40. Moreover, for films RTA processed at 700 °C for 5 min in air and oxygen ambient the current on/off ratios were found to be 836 and 140, respectively.