Nickel ferrite (NiFe2O4) thin films have been deposited on glass substrates by a chemical spray pyrolysis technique at 350 ∘ $^{\circ }$C substrate temperature. The deposited films were annealed at four different temperatures (400, 450, 500 and 550 ∘ $^{\circ }$C), and the effect of annealing temperature on the structural, morphological, optical and magnetic properties were studied. The annealed films were characterized by X-ray diffraction (XRD), Fourier transform infrared spectroscopy (FT-IR), field emission scanning electron microscopy (FE-SEM), UV-visible spectroscopic analysis and vibrating sample magnetometer (VSM). XRD patterns showed that the NiFe2O4 is oriented along (311) plane, which enhances peak intensity with respect to the annealing temperature. The analysis of XRD pattern revealed the formation of single-phase cubic spinel structure. The FT-IR spectrum of NiFe2O4 thin films showed strong absorption peaks around 616 and 353 cm− 1 which indicates the cubic spinel crystal structure of the films. FE-SEM micrographs show that the grain size increases with an increase in annealing temperature. The grain size varies between ∼ 19 and ∼ 28 nm, confirming the nanocrystalline nature of the prepared thin films. The optical properties of the films were studied by an absorbance spectrum in the range of 300 to 800 nm. The results showed that the energy band gap decreased with the increase of annealing temperature. Magnetic properties of NiFe2O4 thin films exhibit a strong dependence on the annealing temperature. The saturation magnetization increases from ∼ 68.29 to ∼ 205.24 emu/cm3 with increasing annealing temperature, which is in favour of modern electronic device miniaturization.