Domain walls are of increasing interest in ferroelectrics because of their unique properties and potential applications in future nanoelectronics. However, the thickness of ferroelastic domain walls remains elusive due to the challenges in experimental characterization. Here, we determine the atomic structure of ferroelastic domain walls and precisely measure the polarization and domain wall thickness at picometer scale using annular bright field imaging in an aberration-corrected scanning transmission electron microscope. We find that the domain wall thickness in PbZr0.2Ti0.8O3 and PbTiO3 thin films is typically about one-unit cell, across which the oxygen octahedron distortion behavior is in excellent agreement with first principles calculations. Remarkably, wider domain walls about two-unit cells in thickness are also observed for those domains walls are coupled with dislocations and underwent a compressive strain. These results suggest that the thickness of ferroelastic domain walls highly depends on their atomic environments. This study can help us to understand the past debatable experimental results and provide further insights into control of domain walls via strain engineering for their possible applications in nanoelectronics.