Currently, micro fabrication has gained popularity because of miniaturization and densification of devices. Accordingly, the importance of optical shape measurement to detect processing defects and verify the necessity of re-processing is increasing. On the other hand, conventional optical shape-sensing methods require complicated settings such as strict calibration and liquid immersion, and long examination durations; however, there is a requirement for a rapid examination method. Thus, in this research, we propose an optical shape-measuring method for drilled objects, using the light leakage through holes. Specifically, improved precision can be expected by scanning target holes illuminated by a monochromatic LED from the back with a micro pinhole installed on a high-precision stage, and detecting light using an area camera passing through the pinhole. Images are captured at every scanning step of the stage, and finally, one integrated image is generated. An advantage of this method is that even if the diameter of the pinhole is larger than the minimum step of the stage, the camera can detect the amount of light leakage; hence, a high-precision image can be captured by our method. Moreover, the proposed method reduces the labor required for setup and shortens the examination time because it does not require liquid immersion and strict calibration for each object. Through the experiment, we verified the proposed method using a pinhole having a diameter of 10 μm, and obtained the image of through holes. As future work, the scanning speed could be improved using multi-arrayed micro pinholes.