We have used coherent X-ray diffraction experiments to characterize both the 1-D and 2-D foci produced by nanofocusing Kirkpatrick-Baez (K-B) mirrors, and we find agreement. Algorithms related to ptychography were used to obtain a 3-D reconstruction of a focused hard X-ray beam waist, using data measured when the mirrors were not optimally aligned. Considerable astigmatism was evident in the reconstructed complex wavefield. Comparing the reconstructed wavefield for a single mirror with a geometrical projection of the wavefront errors expected from optical metrology data allowed us to diagnose a 40 μrad misalignment in the incident angle of the first mirror, which had occurred during the experiment. Good agreement between the reconstructed wavefront obtained from the X-ray data and off-line metrology data obtained with visible light demonstrates the usefulness of the technique as a metrology and alignment tool for nanofocusing X-ray optics.