The work in current article deals with the fabrication of pure and Nitrogen (N) doped (1–20%) Cadmium oxide thin films using sol–gel spin coating processes. The characteristic peak (200) was identified in X-ray diffraction profiles. The grain size and surface roughness values are found to be 7.52 nm, 7.68 nm, 7.89 nm, 7.91 nm, 8.02 nm, 8.05 nm and 15.02 nm, 15.23 nm, 15.31 nm, 15.42 nm, 16.05 nm, 16.06 nm for respective films. The induced vibrational modes were analysed by the Raman spectroscopy. Optical parameters were determined using transmittance, reflectance and absorption spectra. The optical transparency of the fabricated films is observed to be very high (i.e. >80%) and optical band gap is in range of 3.92–3.98 eV. Moreover, nonlinear refractive index (n2) and third order nonlinear susceptibility (χ3) was also calculated and found to be in the range of 2.80 × 10−12 to 1.01 × 10−8 and 1.31 × 10−13 to 1.24 × 10−9 esu.