This paper proposes a hybrid Genetic Algorithm-Simulated Annealing technique for optimal design of grounding grids. The technique aims to minimize the installation cost while ensuring the safety of personnel. The safety indices are obtained; using an electromagnetic formulation based on the well-known quasistatic complex image method together with a closed form of Green's function. This method provides fast and accurate results when it is used in the low-frequency analysis of multilayer grounding systems. The main feature of the proposed technique is its ability to escape from local minimums with good convergence. To examine the performance of the proposed technique, the results associated with an optimal design of a typical grounding grid in a power substation are presented. It is shown that the proposed design complies with the IEEE safety standard, keeping the installation cost as low as possible.