Swift heavy ion (SHI) irradiation is an effective technique to modify the optical properties of the materials. In the present investigation, the effect of 100 MeV Ag7+ SHI irradiation fluence on the optical properties of ZnO1−x:Nx thin films was studied. The post irradiation spectroscopic characterizations such as UV–VIS reflectance spectroscopy, Raman spectroscopy and photoluminescence (PL) spectroscopy analysis were carried out. The studies imply that when the SHI passes through the solid, the higher electronic stopping power of ions can weaken oxygen bonds in ZnO, resulting in the formation of donor defects such as oxygen vacancies and zinc interstitials. The formation of donor defects has been acknowledged through the increase in bandgap with irradiating ion fluence. The blue shift observed from the Raman spectra for the 3 × 1013 ions/cm2 fluence-irradiated films implies the existence of compressive stress in the films. The PL analysis acknowledges the formation of donor defects upon irradiation. Furthermore, it conveys that the presence of N atoms in ZnO lattice leads to the formation of a less number of defects as compared with undoped ZnO while irradiation.