In this paper, the problem of solving some nonlinear Klein–Gordon equations (KGEs) is considered. Here, we derive different fourth- and sixth-order explicit and implicit algorithms to solve the phi-four equation and the form-I of the nonlinear Klein–Gordon equation. Stability and consistency of the proposed schemes are studied under certain conditions. Numerical results are presented and then compared with others obtained from some methods already existing in the scientific literature to explain the efficiency of the new algorithms. It is also shown that similar schemes can be proposed to solve many classes of nonlinear KGEs.