A laser line generator projects a straight line on an object and is widely used for alignment, identification, barcode reading, etc. Conventional laser line generators make use of cylindrical and Powell lenses that convert a laser beam spot into a line. Because of a fixed fan angle, however, the length and brightness of the generated line depends on the working distance between the laser module and object. In this project, using the optical system design software Zemax and engineering CAD software Solidworks, a micromirror based laser line generator is designed and fabricated. The performance of the fabricated micromirror based laser line generator is tested and compared with the performance of a conventional laser line generator. The results show that the length and brightness of image line can be kept constant by the designed generator.