Wavefront measurement for a hard-X-ray nanobeam using single-grating interferometry based on the Talbot effect and the Fourier transform method was demonstrated in the 1-km-long beamline of SPring-8. 10 keV X-rays were one-dimensionally focused down to 32 nm using a total-reflection elliptical mirror. An intentionally distorted wavefront was generated using a deformable mirror placed just upstream of the focusing mirror. The wavefront measured by interferometry was cross-checked with the phase retrieval method using intensity profiles around the beam waist. Comparison of the obtained wavefront errors revealed that they are in good agreement with each other and with the wavefront error estimated from the shape of the deformable mirror at a ∼0.5 rad level.