The invention discloses a printing head modular design based on a 3D printer. A printing head comprises an upper protection cover and a lower protection cover, a moving block is installed between the upper protection cover and the lower protection cover, a wiring board and a fast-plug connector are installed at the upper end of the moving block, a material extruding module is installed at the left end of the moving block, a cooling fan is installed at the right end of the moving block, and an automatic leveling module is installed at the front end of the moving block. The printing head modular design based on the 3D printer has the advantages that the upper protection cover and the lower protection cover are installed, not only is the effect of protecting and shielding circuits achieved, but also the air cooling shunting effect is achieved; automatic leveling miniaturization is achieved, and the problem that a traditional printer head is lack of an automatic leveling device, or the leveling device is overweight is solved; by means of the material extruding module, the weight of the printing head of the 3D printer is significantly reduced, the printing quality and accuracy are improved, and the printing speed is increased; meanwhile, the cooling fan is installed on the moving block, and the effects of radiating heat, preventing heat from moving upwards and cooling a printed model are achieved.