Herein, we present the synthesis, characterization and optical ammonia gas sensing of pure and Sn-doped vanadium oxide (V2O5) nanoparticles prepared by the sol-gel process. The V2O5 nanoparticles were doped with Sn concentrations of 2 wt%–6 wt%, and characterized using X-ray diffraction, atomic force microscopy, UV–vis spectroscopy and photoluminescence spectroscopy which confirmed the orthorhombic crystal structure. The crystalline size was found to decrease with enhancing the doping concentrations of Sn. The lattice-strain and crystalline size with the peak-broadening of pure and Sn doped V2O5 nanoparticles were analyzed by William-Hall (W-H) method and size-strain plot. The UV–vis absorption showed a decrease in the energy band gap (3.27 eV–3.07 eV) with an increase in the Sn doping concentration. The Sn-doped V2O5 nanoparticles were used to detect ammonia gas (5–50 ppm) through photoluminescence based detection method. Interestingly, it was observed that the optical response for the 2 wt% Sn doped V2O5 nanoparticles was maximum (77.84%) towards 50 ppm ammonia compared to other V2O5nanoparticles based samples.