We performed time-domain terahertz spectroscopy on thin layers of single-walled carbon nanotubes (SWCNTs) coated on flexible films. The SWCNT layers demonstrate good shielding of electromagnetic waves in the terahertz range while maintaining good transparency for visible light. The shielding efficiency can be engineered through the thickness control and/or chemical treatment of SWCNT layers. The frequency-dependent dielectric constants of SWCNT layers are in good agreement with the Drude free-electron model