Coffee can increase stomach acid and cause discomfort for some people, but that rise does not automatically mean the stomach is being damaged. Dietitian Danielle Smiley says stomach acid plays a useful role in digestion by helping break down food.

Dietitians cited by Indonesian health outlet DetikHealth from Eating Well say caffeine and several polyphenols in coffee can stimulate production of the hormone gastrin and hydrochloric acid. The urge to use the bathroom after coffee has a different explanation: dietitian Whitney Stuart says coffee stimulates the colon, rather than speeding up the emptying of the stomach.

For people who frequently experience heartburn, coffee may make symptoms worse. Research into its effect on the valve between the stomach and esophagus has produced mixed results. The American College of Gastroenterology notes that laboratory studies suggest coffee can irritate the esophagus and trigger symptoms even without actual acid reflux.

Dietitian Megan Byrd says coffee can also irritate the stomach lining, particularly on an empty stomach, causing nausea or discomfort in sensitive people. A 2024 observational study of more than 3,300 adults, however, found no significant association between coffee or caffeine consumption and functional dyspepsia. The study could not rule out different triggers for individual people.

For those who experience heartburn but want to keep drinking coffee, Stuart suggests trying a darker roast, half-caffeinated coffee or decaffeinated coffee. Byrd says most healthy adults can safely consume up to 400 milligrams of caffeine a day, equivalent to about four 8-ounce cups of brewed coffee. Individual limits may be lower, including during pregnancy, when the limit is usually 200 milligrams. Tea, soda and energy drinks also contribute to daily caffeine intake.