The objective of this study is to characterize the pH sensing performance of carbon nanotubebased thin¯lms and compare them to their non-carbon nanotube-based counterparts. A layerby-layer technique is employed for fabricating the nanocomposites, and pH sensitivity is encoded by incorporating polyaniline (PANI) by itself or with single-walled carbon nanotubes during¯lm fabrication. In particular, polyaniline is doped with di®erent counter ions such as hydrochloric acid (HCl) and methane sulfonic acid (MeSA) for fabricating four di®erent thin¯lm sample sets. The as fabricated¯lms are subjected to various pH bu®er solutions ranging from pH 1 to 13 while their electrical properties are simultaneously measured using two di®erent techniques. First, time-domain bulk¯lm resistance measurements have been conducted, and the¯ndings show that all four types of¯lms exhibit pH sensitivity. Their bulk¯lm resistances increase in tandem with increasing pH. Second, frequency-domain electrical impedance spectroscopy (EIS) has also been conducted when the¯lms are exposed to di®erent pH bu®ers. The recorded EIS spectra have been¯t to a proposed equivalent circuit model consisting of resistors, capacitors and a constant-phase element. The results suggest that the MeSA-based¯lms exhibit linear sensitivity, whereas the HCl-based¯lms exhibit a bilinear sensitivity in the time-domain case. Both HCl-and MeSA-based¯lms exhibit a bilinear pH response in the frequency domain. The equivalent circuit has also revealed that the equivalent parallel capacitor and the constant-phase element of the HCl-and MeSA-doped¯lms also exhibit an inverse bilinear sensitivity to pH bu®er solutions.