We present a new, practical algorithm to test whether a knot complement contains a closed essential surface. This property has important theoretical and algorithmic consequences. However systematically testing it has until now been infeasibly slow, and current techniques only apply to specific families of knots. As a testament to its practicality, we run the algorithm over a comprehensive body of 2979 knots, including the two 20-crossing dodecahedral knots, yielding results that were not previously known.The algorithm derives from the original Jaco-Oertel framework, involves both enumeration and optimisation procedures, and combines several techniques from normal surface theory. This represents substantial progress in the practical implementation of normal surface theory. Problems of this kind have a doubly-exponential time complexity; nevertheless, with our new algorithm we are able to solve it for a large and comprehensive class of inputs. Our methods are relevant for other difficult computational problems in 3-manifold theory, ranging from testing for Haken-ness to the recognition problem for knots, links and 3-manifolds.