The paper proposes an optimization procedure suited to design the shape and the current feed of active coils. A suitable spline-based basis is used for the coil geometry modeling, based on a rather limited number of optimization parameters. In order to simplify the constraints treatment, a set of knot points are introduced, linked with the design degrees of freedom.