We report the design, fabrication and optical investigation of electrically tunable single quantum dots—photonic crystal defect nanocavities operating in both the weak and strong coupling regimes of the light–matter interaction. Unlike previous studies where the dot–cavity spectral detuning was varied by changing the lattice temperature, or by the adsorption of inert gases at low temperatures, we demonstrate that the quantum-confined Stark effect can be employed to quickly and reversibly switch the dot–cavity coupling simply by varying a gate voltage. Our results show that exciton transitions from individual dots can be tuned by4 meV relative to the nanocavity mode before the emission quenches due to carrier tunneling escape. This range is much larger than the typical linewidth of the high-Q cavity modes (100μeV) allowing us to explore and contrast regimes where the dots couple to the cavity or decay by spontaneous emission into the two-dimensional photonic bandgap. In the weak-coupling regime, we show that the dot spontaneous emission rate can be tuned using a gate voltage, with Purcell factors>7. New information is obtained on the nature of the dot–cavity coupling in the weak coupling regime, and electrical control of zerodimensional polaritons is demonstrated for the highest-Q cavities (Q > 12 000). Vacuum Rabi splittings up to 120μeV are observed, larger than the linewidths of either the decoupled exciton ( 6 40μeV) or cavity mode. These observations represent a voltage switchable optical nonlinearity at the single photon level, paving the way towards on-chip dot-based nano-photonic devices that can be integrated with passive optical components.