Electron holography provides a unique phase-imaging approach for characterizing nanoscale electrostatic and magnetic fields. From the relative phase shifts of the electron wave that has passed through the sample, quantitative field measurements that can be related back to specific features of the object can be made. The basic theory and experimental geometry for the off-axis mode of electron holography are first presented. Representative studies over a wide range of materials are then described. Applications involving electrostatic fields include p-n junctions and dopant profiles, piezoelectric fields and ferroelectrics, and charged defects and boundaries. Applications involving magnetic materials include hard magnets, thin films, and nanostructures, both man-made and naturally occurring. Finally, prospects for future developments and applications are briefly discussed.