The invention provides a bending machine which comprises a base, a positioning mechanism on the base and a bending mechanism on one side of the positioning mechanism, wherein the bending mechanism comprises a rotary bracket, a bending shaft mounted on the rotary bracket, a fixed block fixedly connected with the bending shaft, a guiding shaft arranged at the top of the fixed block and in sliding fit with the rotary bracket, a bending block connected with the bending shaft, and a bending air cylinder for driving the rotary bracket to rotate. The positioning mechanism positions a product, and theproduct can be a pipe fitting or a sensor and the like with a smaller size; the bending mechanism bends one end of the product; in specific, after elevating the fixed block, the product is put into,the fixed block is pushed to descend, the bending air cylinder drives the rotary bracket to rotate, the rotary bracket drives the fixed block and the bending block to rotate by certain angle, and thebending block bends the product by certain angle, so that automatic bending of the product is realized, the bending curvature is fixed, the product quality is stable, manpower is saved and volume production is facilitated.