State-of-the-art nanoelectromechanical systems have been demonstrated in recent years using carbon nanotube (CNT) based devices, where the vibration of CNTs is tuned by tension induced through external electrical fields. However, the vibration properties of CNTs under axial tension have not been quantitatively determined in experiments. Here, a novel in situ method for precise and simultaneous measurement of the resonance frequency, the axial tension applied to individual CNTs and the tube geometry is demonstrated. A gradual beam-to-string transition from multi-walled CNTs to single-walled CNTs is observed with the crossover from bending rigidity dominant regime to extensional rigidity dominant regime occur much larger than that expected by previous theoretical work. Both the tube resonance frequency under tension and transition of vibration behavior from beam to string are surprisingly well fitted by the continuum beam theory. In the limit of a string, the vibration of a CNT is independent of its own stiffness, and a force sensitivity as large as 0.25 MHz (pN)−1 is demonstrated using a 2.2 nm diameter single-walled CNT. These results will allow for the designs of CNT resonators with tailored properties.