A tube bender includes a bending tool and a bending base connected to the bending tool. The bending tool has an arched member. The bending base has a first plate, a second plate, a first block, and a second block. The first plate is separated from the second plate to form a bending space therebetween. The first and the second blocks are received in the bending space and pivoted on both the first plate and the second plate. A tube is adapted to be rested on the first and the second blocks while the arched member is able to be moved toward the tube to bend the tube. The first block and the second block are rotated automatically according to a curvature of the tube being bent.