Without CFTR-mediated HCO3- secretion, airway epithelia of newborns with cystic fibrosis (CF) produce an abnormally acidic airway surface liquid (ASL), and the decreased pH impairs respiratory host defenses. However, within a few months of birth, ASL pH increases to match that in non-CF airways. Although the physiological basis for the increase is unknown, this time-course matches the development of inflammation in CF airways. To learn whether inflammation alters CF ASL pH, we treated CF epithelia with TNFα and IL-17, two inflammatory cytokines that are elevated in CF airways. TNFα+IL-17 markedly increased ASL pH by upregulating pendrin, an apical Cl-/HCO3- exchanger. Moreover, when CF epithelia were exposed to TNFα+IL-17, clinically approved CFTR modulators further alkalinized ASL pH. As predicted by these results, in vivo data revealed a positive correlation between airway inflammation and CFTR modulator-induced improvement in lung function. These findings suggest that inflammation is a key regulator of HCO3- secretion in CF airways. Thus, they explain earlier observations that ASL pH increases after birth and indicate that for similar levels of inflammation, the pH of CF ASL is abnormally acidic. These results also suggest that a non-cell-autonomous mechanism, airway inflammation, is an important determinant of the response to CFTR modulators.