We report preparation and structural, optical and electrical properties of polyaniline (PANi), nanocrystalline TiO2 and PANi: TiO2 nanocomposites The TiO2 powder of particle size 50–60 nm was synthesized by sol–gel technique and the polyaniline was synthesized by chemical oxidative polymerization of aniline. The composite films were characterized by X-ray diffraction (XRD), scanning electron microscopy (SEM) Fourier transform infra red (FTIR) and UV-Vis spectroscopy and the results were compared with polyaniline films. The intensity of diffraction peaks for PANi:TiO2 composites are lower than that for TiO2. The characteristic FTIR peaks of PANi were found to shift to higher wave number in PANi: TiO2 composite. These observed effects have been attributed to interaction of TiO2 particles with PANi molecular chains. The room temperature resistivity of polyaniline: nano-TiO2 composite is 3.43 x103 cm and the resistivity of pure nano-TiO2 particles is 1.60 x 106 cm.