If you have a stomach ulcer, the foods you choose can either support healing or make your symptoms worse. There’s no single “ulcer diet,” but the evidence points toward high-fiber, flavonoid-rich foods while limiting alcohol, fried foods, and highly acidic items. The good news: you don’t need to eat bland, boring meals to protect your stomach lining.
High-Fiber Foods Are the Foundation
Fiber is the single most consistent dietary factor linked to ulcer protection. A large Harvard cohort study tracked participants over six years and found that people with the highest fiber intake had a 45% lower risk of developing duodenal ulcers compared to those eating the least fiber. Soluble fiber was even more impressive, cutting risk by 60%.
The best sources of soluble fiber include oats, barley, lentils, beans, apples, and carrots. These foods may help by strengthening the mucus layer that lines your stomach, creating a better barrier between your tissue and digestive acid. Flavonoids, the plant compounds naturally found in many high-fiber foods, appear to play a role in reinforcing that protective layer.
Aim to build meals around these foods rather than treating them as side dishes. A bowl of oatmeal with sliced banana for breakfast, a lentil soup for lunch, or roasted vegetables with barley at dinner all deliver meaningful amounts of soluble fiber without irritating your stomach.
Broccoli Sprouts and Fermented Foods
Most ulcers are caused by a bacterium called H. pylori, and certain foods can help keep it in check alongside medical treatment. Broccoli sprouts stand out here. They contain a compound called sulforaphane that directly suppresses H. pylori colonization in the stomach. In a clinical trial, people who ate about 70 grams of broccoli sprouts daily (roughly a generous handful) for eight weeks showed measurable reductions in H. pylori levels. Regular broccoli has some benefit too, but the sprouts contain far higher concentrations of the active compound.
Probiotic-rich foods like yogurt, kefir, sauerkraut, and kimchi also show promise. Several strains of Lactobacillus and Bifidobacterium bacteria have been studied for their ability to assist in H. pylori eradication and speed up ulcer healing. You don’t need to take a specific supplement. Regularly including fermented foods in your diet gives your gut a steady supply of these beneficial bacteria, which can complement whatever treatment your doctor prescribes.
The Milk Myth
For decades, people with ulcers were told to drink milk to coat and soothe their stomachs. This advice is outdated and potentially counterproductive. Milk does briefly buffer stomach acid, which is why it feels soothing going down. But the protein and calcium in milk then trigger your stomach to produce more acid, with secretion levels reaching 20% to 35% of maximum output. This rebound effect happens with whole, low-fat, and nonfat milk alike.
That doesn’t mean you need to eliminate dairy entirely. Small amounts of milk in your coffee or a serving of yogurt (which has the added benefit of probiotics) are unlikely to cause problems. But drinking multiple glasses of milk as an ulcer remedy will likely make things worse over time.
What to Limit or Avoid
Some foods and drinks reliably aggravate ulcer symptoms, even if they didn’t cause the ulcer in the first place:
- Alcohol is the clearest offender. It stimulates acid production and damages the protective stomach lining simultaneously.
- Fried and high-fat foods like french fries, fried chicken, and rich sauces slow digestion and can increase discomfort. Grilling, baking, or roasting are better cooking methods.
- Highly acidic foods such as tomatoes (including marinara sauce, ketchup, and tomato soup), oranges, and grapefruit can irritate an already damaged stomach lining.
- Carbonated drinks expand in your stomach and create extra pressure, which worsens pain.
- Chocolate combines caffeine, fat, and cocoa, all of which can increase acid or relax the valve at the top of your stomach.
- Peppermint relaxes the same valve despite its reputation as a stomach soother, potentially allowing acid to splash upward.
These aren’t permanent bans for most people. Once your ulcer heals, you can likely reintroduce many of these foods in moderation. While you’re actively healing, though, they’re worth avoiding.
Coffee Is More Complicated Than You Think
Coffee has long been on the “avoid” list for ulcer patients, but the evidence is surprisingly mixed. A large Japanese cross-sectional study of over 8,000 people found no significant association between coffee consumption and gastric or duodenal ulcers. A meta-analysis combining multiple studies confirmed this, with pooled odds ratios hovering right around 1.0, meaning coffee drinkers and non-drinkers developed ulcers at essentially the same rate.
That said, coffee can still increase acid secretion and worsen symptoms in some people, particularly on an empty stomach. The practical approach: if coffee doesn’t bother you, a cup or two is probably fine. If it triggers burning or pain, cut back. You don’t need to quit purely because you have an ulcer.
Zinc and Vitamin B12 During Treatment
If you’re taking acid-reducing medications (proton pump inhibitors, commonly prescribed for ulcers), pay attention to your nutrient intake. Long-term use of these drugs is clearly associated with a mild increased risk of vitamin B12 deficiency, since stomach acid is needed to absorb B12 from food. Good dietary sources of B12 include eggs, fish, poultry, and fortified cereals.
Zinc also plays a direct role in stomach repair. It has anti-inflammatory effects and helps enhance mucus production in the stomach lining. Zinc-rich foods include oysters, beef, pumpkin seeds, chickpeas, and cashews. You don’t necessarily need a supplement if you’re eating a varied diet, but it’s worth making sure these foods show up on your plate regularly.
How to Structure Your Meals
Beyond what you eat, how and when you eat matters. Smaller meals every two to three hours are generally easier on an ulcer than three large meals. A big meal stretches the stomach and triggers a larger surge of acid, which is exactly what you want to minimize while healing.
Eating your last meal or snack at least two hours before bed also helps. Lying down with a full stomach allows acid to pool against your stomach lining and potentially splash into your esophagus. A simple timeline: if you go to bed at 10 p.m., finish eating by 8 p.m.
The overall pattern that works best for ulcer healing is a diet built around whole grains, vegetables, legumes, lean proteins, and fermented foods, with minimal alcohol, fried food, and highly acidic ingredients. It’s not restrictive or complicated. It’s essentially the same eating pattern linked to better health outcomes across the board, with a few ulcer-specific tweaks around meal size and timing.