A method handling fringe patterns based on Mexican hat wavelet transform is presented to improve the ability of spatial localization in wavelet transformation profilometry. Mexican hat wavelet is chosen to perform continuous wavelet transform of the fringe pattern after converting original signal into the analytic form by Hilbert transform. The phase distribution is recovered from the coefficients on the ridge of the transform and the height distribution is retrieved. The simulated results show Mexican hat wavelet transform method has good performance in spatial localization and high accuracy both in the neighborhood of the height-discontinuous points and in the areas with sharply varying height, and the errors can be reduced by 0.1 rad~0.5 rad. The experiment for the fringe image of a plaster face shows Mexican wavelet transform method has smaller error propagation and higher precision than Morlet wavelet method in the areas with incontinuous or sharply varying height.