The magnetic configuration of a nanostructure can be altered by an external magnetic field, by spin-transfer torque or by its magnetoelastic response. Here, we explore an alternative route, namely the possibility of switching the sign of the exchange coupling between two magnetic centres by means of an electric potential. This general effect, which we name electrostatic spin crossover, occurs in insulating molecules with super-exchange magnetic interaction and inversion symmetry breaking. As an example we present the case of a family of di-cobaltocene-based molecules. The critical fields for switching, calculated from first principles, are of the order of 1V nm(-1) and can be achieved in two-terminal devices. More crucially, such critical fields can be engineered with an appropriate choice of substituents to add to the basic di-cobaltocene unit. This suggests that an easy chemical strategy for achieving the synthesis of suitable molecules is possible.