The invention discloses a U-shaped bending machine for a building. The U-shaped bending machine comprises a rack body, a driving mechanism, a first bending mechanism, a second bending mechanism, a fixing piece, a limiting mechanism, a push cylinder controller, a junction box and a steel bar. According to the U-shaped bending machine, the driving mechanism is arranged, a rack drives the first bending mechanism and the second bending mechanism to act through a gear, the synchronism is high, the bent arc shape is uniform, and the U-shaped bending machine is suitable for bending steel bar pieces with high bending precision; the first bending mechanism and the second bending mechanism are arranged, the structure is simple, the bending effect is good, and the labor intensity is low; the fixing piece is arranged, a bending column is arranged to be in a girdling shape, the situation that the steel bar or a steel pipe slips off or collapses out during bending can be prevented, and the safety ofthe machine is guaranteed; and the limiting mechanism is arranged, the steel bars with different bending degrees are subjected to bending limiting length adjustment by adjusting limiting columns in acontaining groove, and the situation that bending is excessive or insufficient is avoided.