We introduce the concept of meta-learning into the design of active optical switches. An optical switch consists of both tunable and nontunable elements. It has been difficult to apply conventional inverse design methods to optical switches, since the optimal choice of the tunable elements depends on the design of the nontunable elements. Here we show that a bilevel optimization scheme, closely related to the concept of meta-learning, can be used for the design of active optical switches. In this scheme, the inner and outer loops correspond to the optimization of the tunable and nontunable elements, respectively. We illustrate this scheme with two designs of optical switches based on different tuning mechanisms. This approach is generally applicable for the design of optical switches as well as other active and tunable optical devices.