Flexible electronic devices have received significant attention in recent years as a result of their flexibility and portability. Carbon nanotube (CNT) films could serve as a promising material for photodetection because of their broad absorption spectral coverage. In this research, vertical ultraviolet (UV) to visible (UV/ Vis) detectors based on tannic acid functionalized carbon nanotube/zinc oxide (TCNT/ZnO) heterojunctions were prepared by a simple spraying method. The TCNT electrode had excellent photoelectric properties with a sheet resistance of 40.6 Ω/sq and transmittance of 80.4 % at 550 nm, and the resulting TCNT/ZnO device could achieve photocurrent of 3.0 mA at 360 nm in the UV range, a recession time of 8.05 s, photoresponsivity of 7.12 A/W, and detectivity of 25.2 × 10 11 Jones. As a comparison, for the pure CNT electrode with a sheet resistance of 45.5 Ω/sq and transmittance of 79.6 % at 550 nm, the CNT/ZnO photocurrent was only 0.6 mA at 360 nm, with a recession time of 17.25 s, photoresponsivity of 1.00 A/W, and detectivity of 3.4 × 10 11 Jones. The prepared device was also able to operate stably after 1000 mechanical bending tests and maintained more than 95 % detectivity, providing a feasible path for the generation of carbon nanotube based photodetector devices.