What Foods to Avoid With an Ulcer and What to Eat

If you have a peptic ulcer, you may be surprised to learn there’s no official list of banned foods. The National Institute of Diabetes and Digestive and Kidney Diseases states that diet does not play a major role in causing, preventing, or treating peptic ulcers, and doctors generally don’t recommend following a special diet. That said, certain foods and drinks can ramp up stomach acid or slow healing, making your symptoms noticeably worse even if they didn’t cause the ulcer in the first place.

The practical approach: pay attention to what triggers your pain, and understand the short list of items with real evidence behind them.

Why Diet Advice for Ulcers Has Changed

For decades, doctors told ulcer patients to stick to bland foods, drink milk, and avoid anything remotely spicy. None of those recommendations held up in controlled studies. We now know that the vast majority of peptic ulcers are caused by either a bacterial infection (H. pylori) or regular use of anti-inflammatory painkillers like ibuprofen and aspirin. Treating the root cause is what heals the ulcer. Diet plays a supporting role at best.

That doesn’t mean food is irrelevant. While no single meal will create or cure an ulcer, what you eat can influence how much acid your stomach produces, how quickly food moves through your digestive tract, and how fast damaged tissue repairs itself. Those factors directly affect how much discomfort you feel day to day.

Alcohol: Not All Drinks Are Equal

Alcohol is one of the few items with clear physiological effects on stomach acid. But the relationship is more nuanced than “all alcohol is bad.” Research on healthy adults found that beer and white wine are potent stimulants of gastric acid secretion, triggering acid output that reached 96% and 61% of the stomach’s maximum capacity, respectively. They also significantly increased gastrin, the hormone that signals your stomach to produce more acid.

Spirits like whisky and cognac, surprisingly, did not stimulate acid secretion at all. Pure ethanol at concentrations above 5% actually had a neutral or slightly inhibitory effect on acid production. The researchers concluded that nonalcoholic compounds in beer and wine, not the alcohol itself, are likely responsible for the acid surge.

This doesn’t mean hard liquor is safe for ulcers. Concentrated alcohol can irritate and damage the stomach lining directly, regardless of acid output. If you’re dealing with an active ulcer, avoiding alcohol entirely while it heals is the most straightforward path. If you do drink, knowing that beer and wine are the strongest acid triggers can help you make more informed choices.

Coffee and Caffeinated Drinks

Coffee is a well-known stomach acid stimulant, which is why it often tops the “avoid” list. However, the science is less clear-cut than you might expect. When researchers tested multiple beverages for their effect on acid secretion, no single property (caffeine content, acidity, calorie count) reliably predicted how much acid the stomach would produce in response. Coffee’s effect varies from person to person.

If coffee consistently triggers burning or gnawing pain in your upper abdomen, cutting back is reasonable. Switching to a lower-acid coffee or drinking it with food can sometimes reduce the irritation. But if coffee doesn’t bother you, there’s no strong clinical reason to eliminate it solely because you have an ulcer.

Spicy Foods: The Biggest Myth

This is where the old advice gets it most wrong. Spicy foods do not cause ulcers. Multiple studies show that capsaicin, the compound that gives chili peppers their heat, actually inhibits acid production in the stomach. Capsaicin has even been studied as a potential protective agent against ulcers in people who regularly take anti-inflammatory painkillers.

That said, spicy food can trigger abdominal pain in some people, particularly those with indigestion or an already-irritated stomach lining. The distinction matters: spicy food isn’t damaging your ulcer or slowing its healing, but it may temporarily amplify discomfort. If a spicy meal consistently causes you pain, avoid it for comfort’s sake. If it doesn’t bother you, there’s no medical reason to give it up.

High-Fat and Fried Foods

Fatty foods deserve more caution than they typically get. A high-fat diet has been shown in animal research to directly slow the healing process of gastric ulcers. Compared to a standard diet, high-fat intake delayed tissue repair, kept inflammatory markers elevated longer than expected, and disrupted the timeline of growth factors the stomach needs to rebuild its lining.

On a practical level, high-fat meals also slow gastric emptying, meaning food sits in your stomach longer. For someone with an ulcer, that can translate to prolonged contact between acid and the damaged area, extending the window for pain. Greasy, fried, and heavily processed foods are the most common culprits. Reducing your intake of deep-fried items, fatty cuts of meat, and rich creamy sauces while your ulcer is healing is one of the more evidence-supported dietary adjustments you can make.

Other Common Irritants

A few additional items tend to aggravate ulcer symptoms in many people, even though the evidence is more anecdotal than clinical:

  • Citrus fruits and juices: Their natural acidity can sting an open sore in the stomach lining, especially on an empty stomach.
  • Tomato-based products: Similar to citrus, the acidity of tomato sauces, ketchup, and tomato juice can increase discomfort.
  • Carbonated drinks: The gas can cause bloating and pressure, and many sodas are also acidic.
  • Chocolate: It can relax the valve between your stomach and esophagus and may increase acid production in some people.

None of these have been shown to cause ulcers or prevent healing. The question is simply whether they make you feel worse. Keeping a brief food diary for a week or two is one of the most effective ways to identify your personal triggers, since individual responses vary widely.

Foods That May Help Healing

While the “avoid” list is shorter than most people expect, the evidence for foods that support ulcer healing is surprisingly solid. A large cohort study from the Harvard School of Public Health 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, the kind found in oats, beans, lentils, barley, and certain fruits, was especially protective, associated with a 60% risk reduction.

The same study found that higher vitamin A intake (from both food and supplements) was linked to a 54% lower risk of duodenal ulcers. Foods rich in vitamin A include sweet potatoes, carrots, spinach, and cantaloupe. Green tea also shows promise: several studies associate regular consumption with a 40% to 50% lower risk of gastritis, the chronic stomach inflammation that often accompanies ulcers.

Probiotic-rich foods like yogurt, kefir, sauerkraut, and kimchi may also play a supporting role. Certain probiotic strains have been shown to reduce stomach inflammation and help suppress H. pylori, the bacterium behind most ulcers. Probiotics work through several mechanisms, including producing compounds that lower stomach pH in ways unfavorable to H. pylori and stimulating the body’s own immune defenses in the gut lining. They won’t replace antibiotic treatment for an active infection, but they can complement it.

A Practical Approach

Rather than following a rigid “ulcer diet,” focus on a few principles. Limit alcohol, especially beer and wine, while your ulcer is active. Cut back on greasy and fried foods to give your stomach lining the best chance to repair itself. Eat more fiber-rich whole foods, colorful vegetables, and fermented foods. Pay attention to your own body’s signals and eliminate the specific items that consistently cause you pain.

Eating smaller, more frequent meals can also help by preventing your stomach from producing large surges of acid at once. Avoid eating within two to three hours of lying down, since gravity helps keep acid where it belongs. And if you’ve been relying on over-the-counter painkillers like ibuprofen or naproxen, talk with your doctor about alternatives, because those medications are far more likely to worsen your ulcer than anything on your plate.