The paper investigates various optimization techniques and their suitability for the magnetic design of electromechanical actuators. Selected algorithms, including Gauss-Newton, Levenberg-Marquardt and Trust region, are examined and compared using 18 test functions. The Levenberg-Marquardt method is chosen for its robustness and fast convergence, and incorporated into an automated CAD optimization system (EAMON), which interfaces an external optimizer to a general purpose finite element package. The EAMON program, which is user friendly with pull-down menus, searches for constrained shape design variables that fulfil prescribed performance criteria. The electromagnetic field analysis forms part of the optimization iterative cycle. Finally, two application examples are described. First, a DC solenoid actuator with truncated cone pole face is optimized to produce a user specified force-displacement characteristic. Secondly, an actuator solenoid is optimized to produce maximum energy per stroke.