In this paper optimal control problems are transformed into structured large-scale nonlinear programming problems. The method of sequential quadratic programming is used for their numerical solution. After an overview about the method, single modules are discussed with respect to the treatment of the problem dimension. Derivatives of nonlinear equations are calculated by automatic differentiation. The sparse Hessian of the problem is partitioned into separate blocks that are updated numerically. Convex linear-quadratic subproblems are treated with a polynomial-time algorithm. The resulting large sparse systems of linear equations are solved with direct factorization. The implementation of the algorithm in the HQP tool is compared with alternative solvers, using a typical optimal control problem as example and increasing its dimension.