Wavelets have become a powerful tool for having applications in almost all the areas of engineering and science such as numerical simulation of partial differential equations. In this paper, we present the Haar wavelet method (HWM) to solve the linear and nonlinear Klein–Gordon equations which occur in several applied physics fields such as, quantum field theory, fluid dynamics, etc. The fundamental idea of HWM is to convert the Klein–Gordon equations into a group of algebraic equations, which involve a finite number of variables. The examples are given to demonstrate the numerical results obtained by HWM, are compared with already existing numerical method i.e. finite difference method (FDM) and exact solution to confirm the good accuracy of the presented scheme.