Systematic understanding and real-time feedback capability for x-ray free electron laser (FEL) accelerator and optical components are critical for scientific experiments and instrument performance. Single-shot wavefront sensing enables characterization of the intensity and local electric field distribution at the sample plane, something that is important for understanding scientific experiments such as nonlinear studies. It can also provide feedback for alignment and tuning of the FEL beam and instrumentation optics, leading to optimal instrument performance and greater operational efficiency. A robust, sensitive, and accurate single-shot wavefront sensor for x-ray FEL beams using single grating Talbot interferometry has been developed. Experiments performed at the Linac Coherent Light Source (LCLS) demonstrate 3σ sensitivity and accuracy, both better than λ∕100, and retrieval of hard x-ray (λ 0.13 nm, E 9.5 keV) wavefronts in 3D. Exhibiting high performance from both unfocused and focused beams, the same setup can be used to systematically study the wavefront from the FEL output, beam transport optics, and endstation focusing optics. This technique can be extended for use with softer and harder x rays with modified grating configurations.