This paper explores the utility of a sixth-order compact finite difference (CFD6) scheme for the solution of the sine-Gordon equation. The CFD6 scheme in space and a third-order strong stability preserving Runge-Kutta scheme in time have been combined for solving the equation. This scheme needs less storage space, as opposed to the conventional numerical methods, and causes to less accumulation of numerical errors. The scheme is implemented to solve three test problems having exact solutions. Comparisons of the computed results with exact solutions showed that the method is capable of achieving high accuracy with minimal computational effort. The present results are also seen to be more accurate than some available results given in the literature. The scheme is seen to be a very reliable alternative technique to existing ones. Copyright (C) 2009 John Wiley & Sons, Ltd.