A grating encoder, which is composed of two equal periodic planar gratings, is proposed for measuring wide range three-axis displacements with nanometric resolution. In the optical reading system, one grating works as a reference planar grating, while another one is a scale planar grating. The grating encoder records the <i>x</i>- and <i>y</i>-axis displacement information in terms of the grating period, while it records the <i>z</i>-axis displacement information in terms of both the wavelength of the laser and the grating period. In this scheme, the gratings and other optical elements satisfy the Littrow configuration. The positions and the size of the detected interference zones are almost constant when the scale grating moves along the <i>z</i>-axis with respect to the optical reading system. Therefore, the measurement range is greatly enhanced in the z-axis direction. When the wavelength of the laser is 632.8 nm and the scale grating with period 8 μm is 100×100 mm<sup>2</sup>, the measured maximal <i>z</i>-axis displacement of the proposed encoder is 1263 mm theoretically.