AbstractThe development of low‐cost ammonia sensors with high sensitivity and selectivity has gained considerable interest. Though the response of these sensors at room temperature is low and needs enhancement. In the present study high sensitivity ammonia gas sensors based on nanocomposite films of polyaniline (PANI) and with varying ZnO concentrations were synthesized and investigated. With a loading of 10 at% ZnO, the gas sensing response of 59 % was obtained for 120 ppm NH3 gas. The gas response was further enhanced by decorating the ZnO nanorods with different concentrations of silver (Ag) nanoparticles. The Ag‐decorated ZnO nanorods were embedded in the PANi matrix using the in‐situ oxidative polymerization technique. It was shown that PANi ZnO, p‐n junction, and the introduction of porosity in nanocomposite act synergistically in increasing the resistance caused by the deprotonation of PANi by NH3. Among various compositions studied, 2 % loading of Ag in ZnO embedded in PANi matrix, thin films were found to be highly selective and sensitive towards NH3 gas at room temperature with a chemiresistive response of 70 % at 120 ppm and a recovery time of less than 120 s. The selectivity of the nanocomposite was also studied towards various reducing and oxidizing gasses.