Single-walled carbon nanotubes (SWCNTs) were dispersed in an imidazolium-based ionic liquid (IL) and investigated in terms of structural quality, surface functionalization and inter-CNT force. Analysis by field emission electron microscopy and transmission electron microscopy shows the IL layer to coat the SWNTs, and FTIR and Raman spectroscopy confirm strong binding of the ILs to the SWNTs. Two kinds of resistive sensors were fabricated, one by drop casting of IL-wrapped SWCNTs, the other by conventional dispersion of SWCNTs. Good response and recovery to NO2 is achieved with the IL-wrapped SWCNTs material upon UV-light exposure, which is needed because decrease the desorption energy barrier to increase the gas molecule desorption. NO2 can be detected in the 1–20ppm concentration range. The sensor is not interfered by humidity due to the hydrophobic tail of PF6 (ionic liquid) that makes our sensor highly resistant to moisture.