Based on FFT, a numerical method suitable for elastoplastic and hyperelastic frictionless contact is proposed in this paper, which can be used to solve 2D and 3D contact problems. The non-linear elastic contact problem is transformed to linear elastic contact considering residual deformation (or equivalent residual deformation). Numerical simulations for elastic, elastoplastic and hyperelastic contact between hemisphere and rigid plane are compared with the results of finite element method (FEM) to verify the accuracy of the numerical method. Compared with the existing elastoplastic contact numerical methods, the calculation efficiency is improved while ensuring a certain calculation accuracy (pressure error does not exceed 15% while calculation time does not exceed 10 minutes in a 64×64 grid). For hyperelastic contact, the proposed method reduces the dependence of the approximation result on load as in linear elastic approximation. Despite a certain error, the simplified numerical method shows a better approximation result than linear elastic contact approximation, which can be used for the fast solution in engineering applications. Finally, taking the sealing application as an example, the contact and leakage rate between 3D complicated rough surfaces are calculated.