In the rapidly rotating, low-viscosity limit of the magnetohydrodynamic equations as relevant to the conditions in planetary cores, any generated magnetic field likely evolves while simultaneously satisfying a particular continuous family of invariants, termed Taylor′s constraint. It is known that, analytically, any magnetic field will evolve subject to these constraints through the action of a time-dependent coaxially cylindrical geostrophic flow. However, severe numerical problems limit the accuracy of this procedure, leading to rapid violation of the constraints. By judicious choice of a certain truncated Galerkin representation of the magnetic field, Taylor′s constraint reduces to a finite set of conditions of size O(N), significantly less than the O(N3) degrees of freedom, where N denotes the spectral truncation in both solid angle and radius. Each constraint is homogeneous and quadratic in the magnetic field and, taken together, the constraints define the finite-dimensional Taylor manifolδ whose tangent plane can be evaluated. The key result of this paper is a description of a stable numerical method in which the evolution of a magnetic field in a spherical geometry is constrained to the manifold by projecting its rate of change onto the local tangent hyperplane. The tangent plane is evaluated by contracting the vector of spectral coefficients with the Taylor tensor, a large but very sparse 3-D array that we define. We demonstrate by example the numerical difficulties in finding the geostrophic flow numerically and how the projection method can correct for inaccuracies. Further, we show that, in a simplified system using projection, the normalized measure of Taylorization, t, may be maintained smaller than O(10-10) (where t= 0 is an exact Taylor state) over 1/10 of a dipole decay time, eight orders of magnitude smaller than analogous measures applied to recent low Ekman-number geodynamo models.