The formation of Pseudomonas aeruginosa biofilms in cystic fibrosis (CF) is one of the most common causes of morbidity and mortality in CF patients. Cyclic di-GMP and cyclic AMP are second messengers regulating the bacterial lifestyle transition in response to environmental signals. We aimed to investigate the effects of extracellular pH and bicarbonate on intracellular c-di-GMP and cAMP levels, and on biofilm formation. P. aeruginosa was inoculated in a brain–heart infusion medium supplemented with 25 and 50 mM NaCl in ambient air (pH adjusted to 7.4 and 7.7 respectively), or with 25 and 50 mM NaHCO3 in 5% CO2 (pH 7.4 and 7.7). After 16 h incubation, c-di-GMP and cAMP were extracted and their concentrations determined. Biofilm formation was investigated using an xCelligence real-time cell analyzer and by crystal violet assay. Our results show that HCO3− exposure decreased c-di-GMP and increased cAMP levels in a dose-dependent manner. Biofilm formation was also reduced after 48 h exposure to HCO3−. The reciprocal changes in second messenger concentrations were not influenced by changes in medium pH or osmolality. These findings indicate that HCO3− per se modulates the levels of c-di-GMP and cAMP, thereby inhibiting biofilm formation and promoting the planktonic lifestyle of the bacteria.