Inflammasomes are multiprotein platforms that control caspase-1 activation, which process the inactive precursor forms of the inflammatory cytokines IL-1β and IL-18, leading to an inflammatory type of programmed cell death called pyroptosis. Studying inflammasome-driven processes, such as pyroptosis-induced cell swelling, under controlled conditions remains challenging because the signals that activate pyroptosis also stimulate other signaling pathways. We designed an optogenetic approach using a photo-oligomerizable inflammasome core adapter protein, apoptosis-associated speck–like containing a caspase recruitment domain (ASC), to temporally and quantitatively manipulate inflammasome activation. We demonstrated that inducing the light-sensitive oligomerization of ASC was sufficient to recapitulate the classical features of inflammasomes within minutes. This system showed that there were two phases of cell swelling during pyroptosis. This approach offers avenues for biophysical investigations into the intricate nature of cellular volume control and plasma membrane rupture during cell death.