The invention discloses a vision localization method of laser marking software. The method comprises the following steps that S1, a product is placed within the work range of a marking table freely, acamera takes a picture to obtain a product picture, and the software loads template parameters; S2, according to the template parameters, the product picture is preprocessed to obtain a preprocessedpicture; S3, traversal of the picture is carried out, and through the template parameters, area coordinates the same with a template are found out and that is a product center; and S4, a template picture is used again, an area is subjected to characteristic point and gray matching and outline fitting, an angle is obtained, and visual treatment is finished. Different clamps do not need to be manufactured according to products, red light preview is not needed, product image template parameters are edited in advance, subsequent any placement is achieved, a visual system automatically finds a target position and direction, deviation is corrected automatically, and precise marking is achieved.