An absolute-type four-degree-of-freedom (four-DOF) grating encoder that can simultaneously measure the three-axis pose (θx, θy, θz) and one-axis out-of-plane position (Z) of an object with high accuracy is demonstrated for the first time in this research. This grating encoder is composed of a stationary reading head and a movable grating reflector. A light beam from the reading head is projected onto the grating, and three diffracted beams (0th-, +1st-, and −1st-order) are generated, collimated, and received by three separate quadrant photodetectors (QPDs). The information of θx, θy, θz, and Z is coded into spot positions of these three diffracted beams on the QPDs. Thus, the modeling and decoupling algorithms were investigated, and an independent calculation of these four-DOF absolute positions was theoretically guaranteed. A prototype was then designed, constructed, and evaluated. Experimental results verified that the proposed grating encoder could achieve the absolute measurement of four-DOF θx, θy, θz, and Z with an accuracy of sub-arcseconds and sub-micrometers. To the best of our knowledge, the proposed encoder in this research is the first one to achieve absolute simultaneous measurements of four-DOF position and pose with a large measurement range. The success of this new grating encoder can benefit various multi-DOF positioning applications, especially for large-scale synthetic aperture optics (SAO), including stitching off-axis parabolic mirrors and pulse compression grating.