Interfaces between complex oxides are emerging as one of the most interesting systems in condensed matter physics1. In this special setting, in which translational symmetry is artificially broken, a variety of new and unusual electronic phases can be promoted2. Theoretical studies predict complex phase diagrams and suggest the key role of the charge carrier density in determining the systems' ground states. A particularly fascinating system is the conducting interface between the band insulators LaAlO3 and SrTiO3 (ref. 3). Recently two possible ground states have been experimentally identified: a magnetic state4 and a two-dimensional superconducting condensate5. Here we use the electric field effect to explore the phase diagram of the system. The electrostatic tuning of the carrier density allows an on/off switching of superconductivity and drives a quantum phase transition6, 7, 8 between a two-dimensional superconducting state and an insulating state. Analyses of the magnetotransport properties in the insulating state are consistent with weak localization and do not provide evidence for magnetism. The electric field control of superconductivity demonstrated here opens the way to the development of new mesoscopic superconducting circuits.