We present a new feedback system to keep laser machining beams in focus at the workpiece surface. This autofocus device is especially desigend wiht laser micromachining in mind, with direct monitoring of the laser focus spot are. It is a non-contact, non-capacitive method relying on the interpretation of video image signals. The autofocusing system functions by imaging a laser line which is projected down on a 45-degree angle onto the surface which is being machined. If the surface deflects up or down, the laser line moves corresondingly in the horizontal plane; this change can be monitored on the imaging system and processed by the autofocusing electronics. The use of a line instead of a small spot of light prevents unexpected 'dives' from the auto-focus laser hitting an already-cut hole. A volage setpoint is produced for feedback to the vertical micropositioning stage controller to move the stage and correct the focusing lens position. Curved or otherwise non-flat workpieces are shown to be precisely machined without prior knowledge of their exact shape.