The powerful Hamilton-Jacobi theory is used for constructing regularizations and error estimates for optimal design problems. The constructed Pontryagin method is a simple and general method for optimal design and reconstruction: the first, analytical, step is to regularize the Hamiltonian; next the solution to its stationary Hamiltonian system, a nonlinear partial differential equation, is computed with the Newton method. The method is efficient for designs where the Hamiltonian function can be explicitly formulated and when the Jacobian is sparse, but becomes impractical otherwise (e.g. for non local control constraints). An error estimate for the difference between exact and approximate objective functions is derived, depending only on the difference of the Hamiltonian and its finite dimensional regularization along the solution path and its L2 projection, i.e. not on the difference of the exact and approximate solutions to the Hamiltonian systems.