Oxygen vacancies, oxidation and chemisorbed oxygen quantities will play a significant role in gas sensing properties of metal oxide semiconductors. Therefore, a suitable and effective method to improve the chemisorbed oxygen on the material surface is well needed to enhance the gas sensing performance. In the present investigations, mesoporous In2O3 and RuO2–In2O3 nanocomposite porous structured thin films with different RuO2 concentrations are prepared using the spray pyrolysis technique with optimized deposition parameters. Addition of RuO2 into In2O3 increases the chemisorbed oxygen on the surface of thin films. The prepared nanocomposite thin films' structural information, micromorphology, specific surface area and porosity are characterized by XRD, FESEM, AFM, TEM, UV–vis spectrophotometry, photoluminescence, XPS and BET. The enhancement of high specific surface area and porosity of RuO2–In2O3 nanocomposite thin films is favourable to gas sensing properties. The In2O3, RuO2–In2O3 nanocomposite thin films possessed highly selective, excellent response and recovery characteristics, and low detection limit towards benzene at room temperature. Among all the samples, RuO2–In2O3 nanocomposite thin film with a concentration of 20 wt% of RuO2 has shown remarkable sensing properties towards 50 ppm of benzene at room temperature.