We use the inverse piezoelectric effect for high-resolution imaging of artificially produced ferroelectric domains in periodically poled potassium titanium phosphate, KTiOPO4, and lithium niobate, LiNbO3, crystals using a modified atomic force microscope (AFM). By monitoring the vertical as well as the lateral deflection of the AFM tip, details of the domains and the domain walls were obtained at 1 nm resolution. With this approach we determine the domain wall width to be 20–80 nm for KTiOPO4 and about 150 nm for LiNbO3. The above technique is of importance in tailoring ferroelectric crystals for frequency conversion of lasers and studies of domain walls in ferroelectric and its magnetic analogs. © 2002 American Institute of Physics.