Inflammasome activation results in the cleavage of gasdermin D (GSDMD) by pro-inflammatory caspases. The N-terminal domains (GSDMDNT) oligomerize and assemble pores penetrating the target membrane. As methods to study pore formation in living cells are insufficient, the order of conformational changes, oligomerization, and membrane insertion remained unclear. We have raised nanobodies (VHHs) against human GSDMD and find that cytosolic expression of VHHGSDMD-1 and VHHGSDMD-2 prevents oligomerization of GSDMDNT and pyroptosis. The nanobody-stabilized GSDMDNT monomers partition into the plasma membrane, suggesting that membrane insertion precedes oligomerization. Inhibition of GSDMD pore formation switches cell death from pyroptosis to apoptosis, likely driven by the enhanced caspase-1 activity required to activate caspase-3. Recombinant antagonistic nanobodies added to the extracellular space prevent pyroptosis and exhibit unexpected therapeutic potential. They may thus be suitable to treat the ever-growing list of diseases caused by activation of (non-) canonical inflammasomes.