The invention discloses a stacking machine which comprises a lifting traction device, a lifting device, a stack pushing device and a stack-bearing rotary operating platform. The lifting traction device is in transmission connection with the lifting device, and the stack pushing device moves in the lifting device; the stack-bearing rotary operating platform is arranged at one side of the stack pushing device; the lifting traction device comprises a lifting traction frame, vertical posts, a speed reducing motor, cross beams, driving shafts, driving chain wheels, chains, guide posts, guide sleeves, lifting device mounting and connecting plates and tension chain wheels; the lifting device comprises a lifting framework, a driving shaft, a driving synchronous pulley, a stack pushing motor, a shaping and clamping device, a material baffling mechanism, the stack pushing device, a synchronous belt, a synchronous belt tension wheel and a synchronous belt connecting seat; and the stack-bearing rotary operating platform comprises a base, a rotary platform, a rotary motor, a worm and worm-wheel transmission case, a conveying motor and a roller conveyor. When the stacking machine is arranged on a conveying line, building blocks are difficult to damage under the condition of guaranteeing the production requirements.