A toothbrush has a handle assembly, a brush-head assembly and a transmitting assembly. The brush-head assembly is slidably mounted in the handle assembly and has a sliding shaft and a swing head. The sliding shaft has two supporting portions mounted on the sliding shaft opposite to the handle assembly. The swing head is mounted on the supporting portions and has a toothed part. The transmitting assembly has a transmitting shaft. The transmitting shaft is rotatably inserted in the sliding shaft and has a longitudinal restriction relative to the sliding shaft. The transmitting shaft has a toothed portion engaging the toothed part. When the transmitting shaft is rotated, the swing head is driven to swing by the toothed part and the toothed portion to provide an improved cleaning effect.