The invention provides a mold for an injection molding machine. The mold comprises an upper mold body and a lower mold body which are arranged oppositely. A mold combination air cylinder is arranged at the upper end of the upper mold body. Adjustment air cylinders are arranged inside the upper mold body and the lower mold body, combination blocks are arranged on telescopic rods of the adjustment air cylinders, and the number of the groups of the adjustment air cylinders and the combination blocks is at least three. A cavity of the upper mold body and the lower mold body is formed through combination of the combination blocks. Material injection pipes are arranged on the left sides of the upper mold body and the lower mold body. The cavity is formed by combining the upper mold body and the lower mold body, and the shape of the cavity can be changed through the adjustment air cylinders and the combination blocks, so that the shape of the mold is changed. The shape of the cavity is changed according to different products, so that frequent formation of molds is avoided, and the production cost is reduced. A console controls the adjustment air cylinders to automatically change the shape of the cavity of the mold, work efficiency is improved, and replacement of the mold is avoided.