A compact interferometer using a grating beamsplitter is reported. The phase of the interference signal was adjusted by using the moire effect of the gratings, so that a small optical path difference was compensated precisely by the magnified displacement of the grating. The optical system was analyzed theoretically on the basis of the Fourier optics. For the interferometric measurement in the microscopic region, a compact optical system was assembled from the microscopic objective and the 25-μm gratings. The characteristics of the proposed interferometer were investigated in the measurements of film thickness, piezoelectric vibration, and photoacoustic effect.