Immune cells process a myriad of biochemical signals but their function and behavior are also determined by mechanical cues. Macrophages are no exception to this. Being present in all types of tissues, macrophages are exposed to environments of varying stiffness, which can be further altered under pathological conditions. While it is becoming increasingly clear that macrophages are mechanosensitive, it remains poorly understood how mechanical cues modulate their inflammatory response. Here we report that substrate stiffness influences the expression of pro-inflammatory genes and the formation of the NLRP3 inflammasome, leading to changes in the secreted protein levels of the cytokines IL-1β and IL-6. Using polyacrylamide hydrogels of tunable elastic moduli between 0.2 and 33.1 kPa, we found that bone marrow-derived macrophages adopted a less spread and rounder morphology on compliant compared to stiff substrates. Upon LPS priming, the expression levels of the gene encoding for TNF-α were higher on more compliant hydrogels. When additionally stimulating macrophages with the ionophore nigericin, we observed an enhanced formation of the NLRP3 inflammasome, increased levels of cell death, and higher secreted protein levels of IL-1β and IL-6 on compliant substrates. The upregulation of inflammasome formation on compliant substrates was not primarily attributed to the decreased cell spreading, since spatially confining cells on micropatterns led to a reduction of inflammasome-positive cells compared to well-spread cells. Finally, interfering with actomyosin contractility diminished the differences in inflammasome formation between compliant and stiff substrates. In summary, we show that substrate stiffness modulates the pro-inflammatory response of macrophages, that the NLRP3 inflammasome is one of the components affected by macrophage mechanosensing, and a role for actomyosin contractility in this mechanosensory response. Thus, our results contribute to a better understanding of how microenvironment stiffness affects macrophage behavior, which might be relevant in diseases where tissue stiffness is altered and might potentially provide a basis for new strategies to modulate inflammatory responses.