Pathogen-derived lipopolysaccharide (LPS) and cytokine tumor necrosis factor (TNF) activate NFκB with distinct duration dynamics, but how immune response genes decode NFκB duration to produce stimulus-specific expression remains unclear. Here, detailed transcriptomic profiling of combinatorial and temporal control mutants identified 81 genes that depend on stimulus-specific NFκB duration for their stimulus-specificity. Combining quantitative experimentation with mathematical modeling, we found that for some genes a long mRNA half-life allowed effective decoding, but for many genes this was insufficient to account for the data; instead, we found that chromatin mechanisms, such as a slow transition rate between inactive and RelA-bound enhancer states, could also decode NFκB dynamics. Chromatin-mediated decoding is favored by genes acting as immune effectors (e.g., tissue remodelers and Tcell recruiters) rather than immune regulators (e.g., signaling proteins and monocyte recruiters). Overall, our results delineate two gene regulatory strategies that decode stimulus-specific NFκB dynamics and determine distinct biological functions.