No single diet will cure a stomach ulcer, and the National Institute of Diabetes and Digestive and Kidney Diseases states that researchers have not found diet plays a major role in causing or treating peptic ulcers. That said, what you eat can meaningfully affect your comfort level, how quickly your stomach lining heals, and whether certain irritants make things worse. The real goal is choosing foods that support your stomach’s protective lining while steering clear of anything that ramps up acid production or inflames already-damaged tissue.
Why Diet Matters Even Though It’s Not the Cure
Most stomach ulcers are caused by either H. pylori bacteria or long-term use of anti-inflammatory painkillers. Treatment targets those root causes with antibiotics or medication changes. But while that treatment works, the food passing through your stomach several times a day either cooperates with healing or works against it. Certain nutrients help maintain the mucus layer that protects your stomach wall. Others trigger extra acid, which is the last thing an open sore needs.
Foods That Support Healing
Fruits and Vegetables Rich in Flavonoids
Flavonoids are natural plant compounds that show activity against H. pylori, the bacterium behind most ulcers. The most studied flavonoids for this purpose include catechins (found in apples, strawberries, kiwi, and green tea), kaempferol (in broccoli, cabbage, beans, and tomatoes), and quercetin (in onions, apples, and citrus fruits). Berries, red wine in moderation, and citrus peels are also rich in related compounds like naringenin and myricetin. These won’t replace antibiotics, but regularly eating a variety of colorful fruits and vegetables gives your stomach consistent exposure to compounds that may help keep H. pylori in check.
High-Fiber Foods
A landmark study in The Lancet tracked ulcer patients over time and found that 80% of those on a low-fiber diet experienced ulcer recurrence, compared to 45% of those eating a high-fiber diet. That’s a striking difference. Good sources include oats, lentils, beans, whole-grain bread, pears, and sweet potatoes. Fiber appears to protect the stomach lining partly by slowing digestion and helping regulate how food interacts with gastric acid.
Vitamin C-Rich Foods
Your stomach naturally secretes vitamin C into gastric juice, where it acts as an antioxidant protecting the lining from damage. In people with significant stomach inflammation, this secretion drops substantially. Eating vitamin C-rich foods like bell peppers, oranges, kiwi, broccoli, and strawberries helps replenish those levels. Studies have also shown that higher dietary vitamin C intake is associated with reduced risk of serious gastric complications down the line.
Probiotic-Containing Foods
Adding probiotics alongside standard ulcer treatment has been shown to improve H. pylori eradication rates by about 10% and cut the risk of treatment side effects nearly in half. Yogurt, kefir, sauerkraut, kimchi, and miso all contain beneficial bacteria from the Lactobacillus and Bifidobacterium families. The benefit appears to come from supporting your gut’s microbial balance during the aggressive antibiotic therapy used to kill H. pylori. If you’re currently on ulcer treatment, probiotic-rich foods are a simple addition that may help the medication work better while reducing nausea and diarrhea.
Foods and Drinks to Limit or Avoid
Coffee and Caffeinated Drinks
Coffee stimulates the production of both gastrin (a hormone that signals your stomach to make acid) and hydrochloric acid itself. Caffeinated coffee, particularly ground coffee, does this more aggressively than decaffeinated varieties. If you have an active ulcer and notice that coffee worsens your pain, switching to decaf or cutting back is a reasonable step. Tea contains less caffeine and also delivers beneficial catechins, so it may be a better option during healing.
Spicy Foods
Capsaicin, the compound that makes chili peppers hot, can inhibit gastric acid production at very low doses but does the opposite at higher doses. In larger amounts, it damages the gastrointestinal lining by triggering inflammation and activating pain receptors in the gut wall. If spicy food causes you burning or discomfort, your body is telling you something useful. This doesn’t mean all seasoning is off limits. Herbs like oregano and peppermint contain flavonoids and are generally well tolerated.
Alcohol
Alcohol is a known gastric irritant and a risk factor for ulcer development. It can erode the mucus barrier that protects your stomach lining, leaving damaged tissue more exposed to acid. During active ulcer healing, avoiding alcohol entirely gives your stomach the best chance to repair itself.
Fried and High-Fat Foods
Nutritional guidelines for ulcer patients consistently allow vegetable oils and olive oil while listing fried foods as prohibited. Frying changes the structure of fats in ways that slow digestion and increase the time your stomach spends producing acid. Baking, steaming, boiling, and sautéing in small amounts of olive oil are gentler alternatives.
The Milk Myth
For decades, doctors told ulcer patients to drink milk to coat the stomach and neutralize acid. The opposite happens. A study measuring gastric acid output found that 240 ml of milk (about one cup) significantly increased acid secretion in both healthy people and ulcer patients, regardless of whether it was whole, low-fat, or nonfat. In ulcer patients specifically, the acid response was even more pronounced. Milk contains both protein and calcium, and both stimulate acid production. The initial cooling sensation is real but temporary, followed by a rebound of increased acid that can aggravate an ulcer. If you enjoy dairy, yogurt with live cultures is a better choice because the probiotics offer a benefit that plain milk does not.
How and When to Eat
Smaller, more frequent meals help keep a steady buffer of food in your stomach without overwhelming it. Large meals stretch the stomach wall and trigger a bigger surge of acid. Aim for four to six modest meals spaced throughout the day rather than two or three large ones. Avoid eating within two to three hours of lying down, since a horizontal position makes it easier for acid to reach the upper stomach and esophagus.
Chewing thoroughly and eating slowly also reduces the workload on your stomach. When food arrives in smaller, well-chewed pieces, your stomach doesn’t need to churn as aggressively or produce as much acid to break it down.
A Practical Day of Eating
Putting this together doesn’t require a complicated meal plan. A typical day might look like oatmeal with sliced strawberries and a cup of green tea in the morning. A mid-morning snack of an apple with a small handful of almonds. Lunch could be a bowl of lentil soup with steamed broccoli. An afternoon snack of yogurt with berries. Dinner might be baked chicken or fish with roasted sweet potatoes, cabbage, and a drizzle of olive oil. The common thread is whole foods, plenty of fiber, colorful produce, and nothing fried or heavily spiced.
These choices won’t replace medical treatment for an active ulcer, but they create an environment in your stomach that cooperates with healing rather than fighting it. The foods that help your ulcer also happen to be the foods that reduce the chance of it coming back.

