A smart sensor with cellulose-based material was developed for the detection of 2,4,6-trinitrotoluene (TNT), using potassium hydroxide/ethanol reagent adsorbed onto a cellulose cotton swab. A red color was observed immediately after exposure to TNT. The sensor allowed rapid qualitative and semi-quantitative analysis of TNT by naked-eye, observation at TNT amounts > 2 μg. To improve precision and accuracy, a smartphone was used to capture digital images of the color. A calibration curve was constructed between log TNT (μg) vs. color intensity, and was linear in the range 1-30 μg-TNT with R 2 = 0.9975. The limit of detection (3.3σ/slope) was 0.11 μg-TNT and percentage relative standard deviation (%RSD, n=10) was 2.30. The sensor was used to detect the TNT samples of soil and from non-porous and porous surfaces.