AbstractTokamaks are sensitive to deviations from axisymmetry as small as δB /B0 ∼ 0.01% with significant degradation or improvement in performance. Ideal Perturbed Equilibrium Code (IPEC) has been developed in order to understand plasma response to such a small non‐axisymmetric perturbation in tokamaks. IPEC has been benchmarked in cylindrical limits, with CAS3D code, and has been validated through Resonant Field Amplification (RFA) measurements and error field correction results. The calculations of perturbed equilibria, such as IPEC in tokamaks, can be used to decompose the distributions of external magnetic perturbations on a control surface by their importance to critical plasma properties. The coupling between the external field at the control surface and the resonant field driving islands at the rational surfaces determine the most important distribution of external magnetic field on the control surface for island opening and plasma locking. It has been shown that the most important distribution of external magnetic field changes little across various plasma profiles and parameters, indicating the possibility of robust error field corrections. The described IPEC method can be also applied to general 3D geometry if a relevant perturbed equilibrium code such as CAS3D is utilized (© 2010 WILEY‐VCH Verlag GmbH & Co. KGaA, Weinheim)