7 Foods to Avoid With an Ulcer

Short answer: Diet does not cause peptic ulcers, and no food will “heal” one. The overwhelming majority of ulcers are driven by Helicobacter pylori infection or long-term use of NSAIDs like ibuprofen and aspirin, and the definitive treatment is medication, not menu changes(1). Food can, however, aggravate or ease symptoms while the ulcer is healing. The most consistent food triggers reported by patients are alcohol, coffee, large fatty meals, and, for some, spicy foods and carbonated drinks.

This article covers what actually causes peptic ulcers, which foods reliably worsen symptoms, which foods and eating habits tend to help, a sample day of ulcer-friendly meals, and when to stop guessing at diet and see a clinician.

What a peptic ulcer actually is

A peptic ulcer is an open sore in the lining of the stomach (gastric ulcer) or the first part of the small intestine (duodenal ulcer). The lining is normally protected by mucus and bicarbonate. When that protection breaks down, stomach acid and the enzyme pepsin can erode the tissue underneath, producing a crater that bleeds, hurts, or, in serious cases, perforates.

The American College of Gastroenterology and Mayo Clinic both identify two dominant causes(1)(2):

  • Helicobacter pylori infection. A spiral bacterium that colonizes the stomach lining and disrupts the mucosal barrier. Roughly half the world’s population carries it, though only a minority develops ulcers.
  • Long-term or high-dose NSAID use. Ibuprofen, naproxen, aspirin, ketorolac, and similar drugs inhibit prostaglandins that maintain the mucosal defense.

Less common causes include Zollinger-Ellison syndrome (a rare acid-hypersecretion tumor), severe physiologic stress in ICU patients, and Crohn’s disease. Everyday emotional stress and spicy food, once blamed for ulcers, do not cause them, though they can worsen symptoms in an existing ulcer.

Where diet fits (and where it does not)

Since the discovery of H. pylori in the 1980s, ulcer care has shifted almost entirely to medication: proton pump inhibitors (PPIs), H2 blockers, and, when H. pylori is present, a course of antibiotics known as eradication therapy(1). That treatment closes most ulcers within 4 to 8 weeks.

Diet plays three supporting roles:

  1. Symptom management while the ulcer heals. Avoiding foods that trigger burning, nausea, or pain lets you eat comfortably.
  2. Removing aggravators that slow healing, especially alcohol and, in heavy drinkers of coffee, caffeinated drinks.
  3. Supporting the gut environment with polyphenol-rich plant foods and, in the case of H. pylori, probiotics that may improve eradication rates when added to standard therapy(3).

No food substitutes for the medical treatment. If you have ulcer symptoms, the diet section of this article is a companion to a diagnosis and prescription, not a replacement.

Foods most likely to aggravate ulcer symptoms

Food or drinkWhy it can aggravateWhat the evidence says
AlcoholIrritates the gastric lining, increases acid secretion, delays healingConsistently discouraged in ulcer care(1)(2). Best to abstain during active healing.
Coffee (caffeinated and decaf)Stimulates acid secretion; the effect is not fully caffeine-drivenIndividual response varies. Many patients tolerate small amounts; heavy intake often worsens symptoms.
Large fatty or fried mealsSlow gastric emptying, prolong acid exposureWidely reported to worsen post-meal pain. Smaller, leaner meals tend to be better tolerated.
Spicy foods (chili, hot sauce, black pepper)Capsaicin can transiently stimulate acid; sensitivity variesDo not cause ulcers, but people with an active ulcer often notice more pain after spicy meals.
Carbonated soft drinksDistend the stomach, may promote refluxOften listed as a trigger; less well studied than alcohol or NSAIDs.
Citrus and tomato productsAcidic pH may sting an inflamed liningDo not increase acid production; may bother some, tolerated by others.
NSAIDs (ibuprofen, aspirin, naproxen)Suppress mucosal-protecting prostaglandinsA leading cause of ulcers and bleeding. Not a food, but must be reviewed with your clinician.

The milk myth

Older ulcer diets recommended drinking milk to coat the stomach. That advice is out of date. Milk briefly buffers acid, but the calcium and protein then stimulate a rebound of acid secretion that can worsen symptoms an hour or two later. Small amounts of low-fat milk with meals are fine for most people, but drinking large volumes as a treatment is not helpful.

Foods and habits that tend to help

Polyphenol-rich plant foods

Berries, apples, broccoli, cabbage, olive oil, green tea, and turmeric supply polyphenols that have shown modest activity against H. pylori in laboratory and small clinical studies. They are unlikely to eradicate the bacterium on their own, but they contribute to a diet pattern associated with better mucosal health.

Fiber, from tolerated sources

Higher dietary fiber intake has been linked in observational studies to lower risk of duodenal ulcer recurrence. Soluble fiber sources such as oats, cooked carrots, bananas, applesauce, and well-cooked lentils are usually well tolerated.

Probiotics (as an adjunct)

Meta-analyses of clinical trials show that adding specific probiotic strains (particularly certain Lactobacillus and Bifidobacterium species, and Saccharomyces boulardii) to standard H. pylori triple or quadruple therapy modestly increases eradication rates and reduces antibiotic-related side effects such as diarrhea(3). Probiotics are an add-on, not a stand-alone therapy. Discuss strain and timing with your clinician.

Lean proteins and gentle cooking

Skinless poultry, white fish, eggs, tofu, and well-cooked beans provide protein without the heavy fat load of fried meats. Baking, steaming, and poaching are easier on the stomach than deep frying.

Smaller, more frequent meals

Eating four to six small meals rather than two or three large ones limits how much the stomach is stretched at any one time and produces a steadier acid environment.

Sample day for someone with an active ulcer

This is a template only; adjust portions and tolerated foods with your dietitian, especially if you have coexisting reflux, IBS, or diabetes.

  • Breakfast (7:30 a.m.): 1 cup cooked oatmeal with 1/2 cup blueberries and 1 tablespoon almond butter. Herbal tea (chamomile or ginger).
  • Mid-morning (10:00 a.m.): Half a banana with a small handful of walnuts.
  • Lunch (12:30 p.m.): Baked chicken breast, quinoa, steamed carrots, and lightly dressed cucumber salad (olive oil, small amount of vinegar or lemon if tolerated).
  • Afternoon (3:30 p.m.): Plain low-fat yogurt or kefir with a drizzle of honey.
  • Dinner (6:30 p.m.): Poached white fish, sweet potato, sautéed spinach in olive oil, small serving of brown rice.
  • Evening (8:00 p.m., at least 2 to 3 hours before bed): Applesauce or a slice of whole-grain toast with a thin layer of almond butter.

Fluids across the day: water, herbal teas, and diluted non-citrus juices as tolerated. Avoid alcohol entirely and limit coffee to what you know you tolerate; many people find one small morning cup fine but two or three worsen symptoms.

Everyday habits that matter

  • Stop smoking. Smoking delays ulcer healing and raises the risk of recurrence.
  • Review pain relievers. If you take ibuprofen, naproxen, or daily aspirin, ask your clinician whether acetaminophen (paracetamol) is a safer option while your ulcer heals, and whether a gastroprotective medication is needed if NSAIDs must continue.
  • Finish the full medication course. Stopping PPIs or antibiotics early is a common reason ulcers come back or H. pylori is not eradicated.
  • Manage stress. Stress does not create ulcers but it can amplify pain perception and disrupt sleep, which slows recovery.
  • Do not eat late. Give yourself at least two hours between the last meal and lying down.

When to call a clinician urgently

Any of the following symptoms may signal a bleeding or perforating ulcer and needs same-day medical attention:

  • Black, tarry stools or vomiting blood or “coffee-ground” material.
  • Sudden, severe, unrelenting abdominal pain.
  • Lightheadedness, fainting, or a fast heart rate with abdominal pain.
  • Persistent vomiting or an inability to keep fluids down.
  • Unexplained weight loss with ongoing upper-abdominal pain.

Bottom line

Peptic ulcers are a medication problem first and a food problem second. Get tested for H. pylori, review NSAID and aspirin use, and complete any prescribed acid-suppression or antibiotic course. Around that, use diet to stay comfortable: skip alcohol, keep coffee modest, favor smaller and less fatty meals, and lean on plant foods, lean protein, and, if your clinician agrees, probiotics as an adjunct to H. pylori therapy.

Frequently asked questions

Do spicy foods cause ulcers?

No. Spicy foods do not cause peptic ulcers. In people with an active ulcer, capsaicin from chilies can transiently increase pain, and many patients choose to avoid spicy foods until the ulcer heals. Once healed, most tolerate them again in moderation.

Is milk good for an ulcer?

Not the way it was once thought. Milk briefly buffers acid but stimulates rebound acid secretion afterwards, which can worsen pain later. Small amounts with meals are fine; do not use milk as a treatment.

Can I drink coffee if I have a stomach ulcer?

It depends on tolerance. Coffee (both caffeinated and decaf) can stimulate acid secretion. Some people tolerate a small morning cup with food; heavy intake tends to worsen symptoms. Watch how your stomach responds and discuss with your clinician.

Can probiotics help heal an ulcer?

Probiotics do not heal ulcers on their own. Certain strains, added to standard H. pylori eradication therapy, modestly improve eradication rates and reduce antibiotic-related diarrhea(3). Ask your gastroenterologist about specific strains and dosing.

What foods heal a stomach ulcer fastest?

No single food heals an ulcer. Healing depends on suppressing acid (usually with a PPI) and, if present, eradicating H. pylori with antibiotics. Diets rich in polyphenols, fiber, and lean protein support recovery but are not a treatment.

Are bananas good for stomach ulcers?

Bananas are typically well tolerated and can be a soothing snack. They are low in fat and acid and provide soluble fiber and potassium. They will not cure the ulcer but rarely aggravate symptoms.

How long does an ulcer take to heal with treatment?

Most peptic ulcers heal within 4 to 8 weeks of appropriate acid-suppression therapy, sometimes longer if the ulcer is large or if H. pylori eradication is difficult. Do not stop medication early even if pain improves in the first week.

Medical disclaimer: This article is for general information only and is not a substitute for professional medical advice, diagnosis, or treatment of peptic ulcer disease. Peptic ulcers can bleed, perforate, or obstruct the digestive tract and require evaluation by a qualified clinician.

Do not stop, start, or change prescribed medication, including proton pump inhibitors, H2 blockers, NSAIDs, aspirin, or antibiotics, based on this article. Test and treatment decisions for Helicobacter pylori must be individualized.

If you have symptoms such as black or bloody stools, vomiting blood, severe abdominal pain, unintentional weight loss, or persistent vomiting, seek medical care the same day.

Always consult a physician or registered dietitian before making significant dietary changes, particularly if you take medication, are pregnant or nursing, or manage a chronic illness. Individual responses vary.

Current Version
August 1, 2026
Edited By
Damla Sengul
March 13, 2022
Written By
Damla Sengul
July 27, 2026
Updated By
Damla Sengul
  1. Chey WD, Leontiadis GI, Howden CW, Moss SF. ACG Clinical Guideline: Treatment of Helicobacter pylori Infection. Am J Gastroenterol. 2017;112(2):212-239. gi.org
  2. Mayo Clinic. Peptic ulcer: Diagnosis and treatment. mayoclinic.org
  3. Zheng X, Lyu L, Mei Z, et al. Lactobacillus-containing probiotic supplementation increases Helicobacter pylori eradication rate: evidence from a meta-analysis. Multiple meta-analyses through 2019 on probiotics as adjuncts to H. pylori eradication.
  4. National Institute of Diabetes and Digestive and Kidney Diseases (NIDDK). Peptic Ulcers (Stomach Ulcers). niddk.nih.gov
  1. USDA FoodData Central. Source
  2. USDA Dietary Guidelines for Americans, 2020-2025. Source
  3. Academy of Nutrition and Dietetics. Food & Nutrition. Source
  4. Harvard T.H. Chan School of Public Health. The Nutrition Source. Source
  5. NIH Office of Dietary Supplements. Fact Sheets. Source