SiO 2 films containing nickel were prepared using the sol–gel method with nominal Si to Ni atomic ratios of 1.2, 3.1 and 7.1. After thermal annealing under different conditions, the optical properties of the films were studied using optical reflectance and transmittance measurements. It was found that samples annealed in air at 500 °C show an absorption band at wavelengths of about 440 nm associated with Ni 2+ ions in octahedral positions. In addition, in films with Si to Ni atomic ratios of 1.2 and 3.1, there is an absorption edge at short wavelengths, indicating the formation of NiO nanosized particles. Samples with a Si to Ni atomic ratio of 1.2 were also heat-treated in a H 2 /N 2 atmosphere at 500 and 800 °C, producing metallic Ni nanoparticles embedded in the vitreous matrix. The effective dielectric function of both NiO–SiO 2 and Ni–SiO 2 composite films was modeled with the Maxwell–Garnett expression. X-ray diffraction measurements confirm the presence of NiO and Ni nanoparticles in the films.