The pyrrole monomers have been synthesized by in situ oxidative polymerization and followed by the drop casting of polypyrrole thin films onto glass. The optimized PPy thin film for gas sensor showed the highest NO 2 sensitivity of 40.08 % at room temperature with a stable response even after 45 days with a retention of stability of around 86 %. The gas sensing results suggested that the nanogranular PPy sensor exhibited an excellent response toward NO 2 and also showed high sensitivity even at low concentrations up to 10 ppm. • Synthesis of pyrrole monomers by in situ oxidative polymerization for NO 2 gas sensor. • Achieve sensitivity of 40.08 % at room temperature with a stable response even after 45 days. • Selective sensing towards NO 2 within a wide range of concentrations from 10 to 100 ppm. • The sensor exhibits reliable long-term stability, reproducibility and reversibility. Nanogranular polypyrrole (PPy) have been synthesized by in-situ oxidative polymerization of pyrrole monomer followed by deposition of PPy thin films onto a glass substrate by drop casting method. The deposited thin films were characterized for their structural, morphological, compositional studies using x-ray diffraction (XRD), transmission electron microscopy (TEM), field emission scanning electron microscopy (FE-SEM), and x-ray photoelectron spectroscopic (XPS) studies. The XRD patterns revealed that the synthesized films are amorphous in nature. FE-SEM microscopic images exhibit agglomerated granular-like morphology of PPy thin films with high degree of roughness. The XRD patterns confirm the amorphous nature of PPy thin films. XPS analysis reveals the formation of PPy. The gas sensing properties of PPy thin film based gas sensor were studied in terms of sensitivity, response-recovery time, selectivity and stability by varying the concentration of nitrogen dioxide (NO 2 ) gas. The optimized PPy thin film gas sensor showed highest sensitivity of 40.08 % at room temperature with stable response even after 45 days with retention of stability around 86%. The gas sensing results suggested that nanogranular PPy sensor exhibited an excellent response toward NO 2 and also showed high sensitivity even at low concentrations upto 10 ppm level.