Tailoring carbon nanomaterials for specific applications is of great importance in the quest to improve the properties of these materials, increasing their functionalities. Using a simple and easy to apply technique, zinc, zinc oxide, and iodine are encapsulated and confined within doubleâwalled carbon nanotubes (DWNTs) whose internal diameter ranges from 1.2 to 2.5ânm. The simultaneous confinement of zinc and iodine is shown to improve the sensitivity by 100 times while, at the same time, enhancing the selectivity of DWNTs toward formaldehyde. By exploiting the pâdoping effect of iodine, carbon nanotube (CNT) networks are engineered to differentiate formaldehyde from some of the common volatile organic compounds, such as ethanol and acetone. The ability to tune the chemical selectivity and sensitivity of CNTâbased sensors through inner encapsulation of a specific material thus appears as a new possible route compared with more conventional outer surface functionalization.