Is Coffee Bad for Stomach Ulcers? The Real Answer

Coffee does not appear to cause stomach ulcers or make them harder to heal. Despite decades of doctors advising ulcer patients to cut out coffee, large-scale studies have consistently failed to find a link between coffee drinking and ulcer development. That said, coffee can increase acid production and worsen day-to-day symptoms, especially if you have an active ulcer or an H. pylori infection. The full picture is more nuanced than a simple yes or no.

Coffee Does Not Cause Ulcers

The strongest evidence on this question comes from a meta-analysis published in PLOS One that pooled data from multiple case-control and cohort studies. For gastric ulcers, the pooled odds ratio was 0.88, meaning coffee drinkers were no more likely to develop one than non-drinkers. For duodenal ulcers (the other common type), the pooled odds ratio was 1.17. Neither result was statistically significant. When researchers looked at peptic ulcers overall, the odds ratio was essentially 1.0, showing no meaningful association.

A separate cross-sectional study of over 8,000 people in Japan confirmed these findings. After adjusting for other variables, coffee consumption showed no significant link to either gastric or duodenal ulcers. The factors that did matter were H. pylori infection (which increased gastric ulcer risk roughly 18-fold), current smoking (about 3.5 times the risk), higher BMI, and markers of stomach lining damage. Coffee didn’t register.

How Coffee Affects Stomach Acid

Coffee does stimulate acid production, which is why it gets blamed for ulcer problems. Caffeine triggers acid-producing cells in the stomach lining through bitter taste receptors. When caffeine binds to these receptors, it activates a signaling pathway that increases levels of a messenger molecule called cAMP, which in turn tells cells to pump more protons (hydrogen ions) into the stomach. In lab studies, caffeine exposure raised cAMP levels by about 12%.

This mechanism is real, but context matters. Your stomach already maintains a pH between 1 and 3, which is intensely acidic. Coffee itself has a pH around 5, making it far less acidic than your stomach’s own secretions and considerably milder than orange juice or soda, which sit closer to pH 2 or 3. The modest bump in acid production coffee triggers is unlikely to damage a healthy stomach lining, though it can be a different story when the lining is already compromised by an ulcer.

The Difference Between Causing Ulcers and Causing Symptoms

This is the key distinction most people miss. Coffee may not cause or worsen ulcers structurally, but it can absolutely make you feel worse if you already have one. A cross-sectional study of patients with active H. pylori infections found a statistically significant link between coffee consumption and upper gastrointestinal symptoms like pain, bloating, nausea, and burning. The relationship was dose-dependent: more coffee, more symptoms.

H. pylori is the bacterium responsible for the vast majority of stomach ulcers. If you’re dealing with an active infection and an ulcer at the same time, coffee can amplify the discomfort even if it isn’t making the underlying ulcer larger or deeper. One cohort study even found a 4.6-fold increase in the risk of H. pylori progressing from a negative to a positive status in coffee drinkers, though this finding needs more research to confirm.

Does Coffee Slow Ulcer Healing?

Clinical reviews have concluded that moderate caffeine consumption likely has no effect on ulcer healing rates. Researchers have also pointed out that singling out coffee while allowing other potent stimulants of acid secretion, like milk, is not scientifically justified. Milk was once recommended as an ulcer remedy, but it also triggers acid production.

The practical takeaway: if you’re being treated for an ulcer with acid-reducing medication, coffee is unlikely to undermine that treatment. But if you notice that coffee makes your pain or burning worse during the healing period, reducing your intake is a reasonable response to your own body’s signals.

Coffee Preparation Methods That May Help

If you want to keep drinking coffee while managing stomach sensitivity, how you brew it matters more than most people realize.

  • Dark roasts tend to be lower in acidity than light or medium roasts. The longer roasting process breaks down more of the compounds that stimulate acid production.
  • Cold brew extracts fewer titratable acids than hot brewing, according to research published in Scientific Reports. However, the pH difference is small: cold brew lands around 5.1 compared to hot coffee’s range of 4.85 to 5.10. The real difference is in the total acid content rather than the pH number itself.
  • Espresso tends to be less acidic than drip coffee because of its quick brewing time, which limits how much acid gets extracted.
  • Low-acid coffee brands use beans or processing methods designed to reduce acidity, but the pH difference is modest, around 5.7 compared to regular coffee’s 5.2.

None of these methods transform coffee into a neutral beverage, but for someone with a sensitive stomach, switching from a light-roast pour-over to a dark-roast cold brew could meaningfully reduce discomfort.

What Actually Causes Stomach Ulcers

The two dominant causes of peptic ulcers are H. pylori infection and long-term use of nonsteroidal anti-inflammatory drugs like ibuprofen and aspirin. In the Japanese study of 8,000 subjects, H. pylori infection was by far the strongest predictor of both gastric ulcers (odds ratio of 18.55) and duodenal ulcers (odds ratio of 37.23). Smoking was the next biggest risk factor, roughly tripling the odds of a gastric ulcer.

Coffee didn’t make the list. Neither did alcohol. If you have an ulcer and you’re looking for lifestyle changes that actually affect outcomes, quitting smoking and getting tested for H. pylori are far more impactful than giving up your morning cup. Treating an H. pylori infection with a short course of antibiotics and acid-reducing medication cures most ulcers entirely, regardless of coffee habits.