Most ulcer-friendly eating comes down to emphasizing fiber-rich fruits and vegetables, fermented foods, and certain cruciferous vegetables while cutting back on alcohol, very salty foods, ultra-processed snacks, and refined sugar. The specifics, though, are more interesting than the usual bland-diet advice you may have heard. Some foods traditionally blamed for aggravating ulcers turn out to be harmless or even helpful, and a few everyday items have surprisingly strong research behind them as stomach protectors.
Why What You Eat Matters When You Have an Ulcer
Nearly all peptic ulcers are caused by either an infection with a bacterium called H. pylori or the regular use of non-steroidal anti-inflammatory drugs like ibuprofen and aspirin.1Medicine. Stomach Helicobacter pylori infection and peptic ulcers That means food does not create ulcers on its own. But food absolutely influences how fast an ulcer heals, how much discomfort you feel, and whether the conditions in your stomach help or hinder the bacteria involved. Think of your diet as the environment your stomach lining has to work in: you can make that environment gentler and more supportive, or you can fill it with things that erode your defenses.
Fruits, Vegetables, and Fiber
If there is a single dietary pattern that consistently shows up as protective, it is eating plenty of fruits and vegetables. Soluble fiber from these foods appears to guard against duodenal ulcers, while refined sugars act as a risk factor.2Digestive and Liver Disease. Diet and duodenal ulcer The protection likely comes from multiple directions at once. Fiber helps regulate the speed at which food moves through your digestive tract, and it feeds beneficial gut bacteria that contribute to a healthier stomach environment.
Beyond fiber, many fruits and vegetables are rich in flavonoids, a broad class of plant compounds found in berries, apples, citrus fruits, leafy greens, onions, and tea. Research in both lab and animal models shows that flavonoids strengthen the stomach’s defenses by boosting mucus and prostaglandin production while also tamping down inflammation and oxidative stress.3PubMed Central. Preventative and Therapeutic Potential of Flavonoids in Peptic Ulcers They also have direct antibacterial activity against H. pylori.4PubMed Central. A Review of the Role of Flavonoids in Peptic Ulcer (2010-2020) You do not need to chase exotic superfoods here. Ordinary apples, for instance, contain polyphenols in their peels that inhibit the urease enzyme H. pylori uses to survive in the stomach’s acidic environment.5PubMed. Association between polymerization degree of apple peel polyphenols and inhibition of Helicobacter pylori urease A daily apple with the peel on is not a cure, but it is a reasonable, evidence-backed habit.
Broccoli Sprouts Deserve Special Mention
Of all the foods studied for their effect on H. pylori, broccoli sprouts have some of the most striking data. They are rich in sulforaphane, a compound that is powerfully antibacterial against H. pylori.6PubMed. Dietary sulforaphane-rich broccoli sprouts reduce colonization and attenuate gastritis in Helicobacter pylori-infected mice and humans In a mouse study using human gastric tissue grafts, sulforaphane completely eradicated the bacterium in most of the treated samples.7PubMed Central. Efficacy of sulforaphane in eradicating Helicobacter pylori in human gastric xenografts implanted in nude mice A small preliminary human trial found that eating broccoli sprouts daily was associated with clearing the infection in about a third of participants, with most showing reduced bacterial markers during the treatment period.8PubMed. Oral broccoli sprouts for the treatment of Helicobacter pylori infection: a preliminary report
Those human numbers are modest and the study was tiny, so broccoli sprouts are not a replacement for antibiotics if your doctor has prescribed an eradication regimen. But as a dietary addition, they have more evidence behind them than most foods people ask about. Broccoli sprouts are easy to find in grocery stores or to grow at home from seed in a few days. Mature broccoli contains sulforaphane too, though in lower concentrations than the sprouts.
Fermented Foods and Probiotics
Yogurt, kefir, sauerkraut, kimchi, miso, and other fermented foods supply live bacteria that can work in your favor. Both lab research and clinical trials indicate that several probiotic strains have activity against H. pylori.9PubMed Central. Fermented Foods: Are They Tasty Medicines for Helicobacter pylori Associated Peptic Ulcer and Gastric Cancer? Lactobacillus species commonly found in fermented dairy products have been shown to decrease H. pylori infection density, reduce mucus depletion, and lower urease activity through the organic acids they produce.10PubMed. Fermented Foods and Their Abating Role in Gastric Ulcers
Probiotics also appear to help the stomach lining more broadly. Reviewed evidence points to mechanisms including protection of the mucosal barrier, increased production of mucus and growth factors, and stimulation of new blood-vessel growth in damaged tissue.11PubMed Central. Potential role of probiotics in the management of gastric ulcer If you are currently on a standard ulcer treatment that includes antibiotics, adding fermented foods or a probiotic supplement is a reasonable companion strategy. Many gastroenterologists already recommend this to reduce antibiotic-related side effects like diarrhea.
What to Cut Back On or Avoid
Some dietary villains have stronger evidence than others. Here are the ones worth taking seriously:
- Alcohol: Ethanol directly damages the stomach lining. Research shows it breaks down the gastric mucosal barrier, allowing acid to leak back into tissue where it causes injury.12PubMed. Gastric mucosal blood flow in ethanol-induced mucosal damage in the rat The damage does not appear to depend on how the body metabolizes alcohol; the ethanol itself is the problem.13PubMed. Gastric mucosal oxidation of ethanol is not involved in ethanol-induced mucosal damage If you have an active ulcer, avoiding alcohol entirely while it heals is the safest approach.
- Very salty foods: High salt intake makes an H. pylori infection worse. It disrupts the mucosal barrier, increases inflammation, and can even change which genes the bacterium expresses, making it more aggressive.14PubMed Central. High-Salt Diet Exacerbates H. pylori Infection and Increases Gastric Cancer Risks Animal research has found that high-salt diets lead to more severe stomach inflammation, higher gastric pH, and greater loss of the acid-producing cells in the stomach lining when H. pylori is present.15PubMed Central. High dietary salt intake exacerbates Helicobacter pylori-induced gastric carcinogenesis This does not mean you need a zero-salt diet, but heavily salted processed meats, pickled foods swimming in brine, and salty snack foods are worth scaling back.
- Ultra-processed foods: A large Spanish cohort study found that people in the highest tier of ultra-processed food consumption had roughly 50 percent higher risk of developing peptic ulcer disease compared to those eating the least.16PubMed Central. Association between the consumption of ultra-processed foods and the incidence of peptic ulcer disease in the SUN project Ultra-processed foods tend to be high in salt, sugar, emulsifiers, and artificial additives while being low in fiber and protective plant compounds, so this finding aligns with other evidence.
- Refined sugar: As mentioned, refined sugars show up as a risk factor for duodenal ulcers.2Digestive and Liver Disease. Diet and duodenal ulcer Sugary soft drinks and heavily sweetened processed foods are the main culprits here, not the natural sugars in whole fruit.
The Spicy Food Myth
If you have ever been told to avoid spicy food because of your ulcer, the actual research may surprise you. Capsaicin, the compound that makes chili peppers hot, has been studied extensively since the 1990s and does not appear to cause or worsen ulcers. A comprehensive review found that capsaicin does not stimulate acid secretion but actually inhibits it, stimulates protective mucus and alkali output, and increases blood flow to the stomach lining, all of which help prevent and heal ulcers.17PubMed. Capsaicin and gastric ulcers
In human volunteers, low doses of capsaicin applied directly to the stomach reduced baseline acid output and protected against damage from both alcohol and indomethacin (a common NSAID).18PubMed Central. Gastroprotection induced by capsaicin in healthy human subjects Dose matters, though. At very high doses in animal studies, capsaicin can flip from protective to harmful, enhancing mucosal damage by causing excess acid production.19PubMed. Four response stages of capsaicin-sensitive primary afferent neurons to capsaicin and its analog: gastric acid secretion, gastric mucosal damage and protection In normal human eating amounts, however, the evidence leans protective.
This does not mean spicy food will feel comfortable if you have an active ulcer. The burning sensation in your stomach is real and unpleasant. But the discomfort is not the same as damage. If you tolerate moderate amounts of chili without pain, there is no medical reason to eliminate it. If it hurts, scale back until the ulcer has healed and then gradually reintroduce it.
Coffee and Your Stomach
Coffee sits in a gray zone. It stimulates gastric acid secretion, which sounds like it should be bad for ulcers, but the overall relationship between coffee and peptic ulcers remains controversial in the research literature.20PubMed Central. Effects of Coffee on the Gastro-Intestinal Tract: A Narrative Review and Literature Update Large observational studies have not consistently shown that coffee drinkers develop more ulcers. The acid-stimulating effect is real, but coffee also contains hundreds of bioactive compounds, some of which may be anti-inflammatory.
The practical takeaway: if coffee causes you noticeable pain or burning, cut back or switch to a lower-acid option while your ulcer heals. If you drink a couple of cups a day with no symptoms, there is no strong evidence that you need to give it up. Drinking coffee on a completely empty stomach may be more irritating than having it with or after a meal, so timing can help.
Zinc-L-Carnosine, a Supplement Worth Knowing About
One compound that sits in between food and medicine is zinc-L-carnosine, a chelated form of zinc approved in Japan specifically for gastric ulcers. It has direct mucosal protective and anti-inflammatory effects, working through antioxidant activity, cytokine modulation, and membrane stabilization.21PubMed. The role of Zinc L-Carnosine in the prevention and treatment of gastrointestinal mucosal disease in humans: a review Human studies support its ability to promote repair of mucosal injury and to help restore the gastric lining.22PubMed Central. A Review of Zinc-L-Carnosine and Its Positive Effects on Oral Mucositis, Taste Disorders, and Gastrointestinal Disorders It is available as an over-the-counter supplement in many countries. While it is not a substitute for standard ulcer treatment, it can be a useful addition, particularly if you are dealing with slow healing or ongoing stomach lining irritation. Talk to your doctor before adding it, especially if you are already on other medications.
Meal Timing and Eating Habits
Beyond what you eat, when and how you eat may matter. A study of more than 700 adults found that people with irregular meal timing were more likely to have H. pylori infection and gastritis.23PubMed Central. Irregular Meal Timing Is Associated with Helicobacter pylori Infection and Gastritis The hypothesis is that the stomach prepares secretions on a schedule, and when food does not arrive at the expected time, the lining may become more vulnerable. Eating at roughly consistent times each day is a low-effort habit that could pay off.
Smaller, more frequent meals are another piece of traditional ulcer advice that still holds some logic, though the evidence is less formal. When you eat a large meal, your stomach produces a large burst of acid to digest it. Spreading your food intake across four or five smaller meals can keep acid levels more moderate. This is especially relevant if your ulcer causes pain between meals or at night, since smaller evening meals may reduce overnight acid production.
Smoking, Stress, and Other Non-Food Factors
No article about ulcer management is complete without mentioning smoking. Research shows that smokers are significantly more likely to have persistent or relapsing duodenal ulcers than people who quit. In one study, about 61 percent of continuing smokers still had ulceration at six months compared to 28 percent of those who had stopped.24PubMed Central. Cigarette smoking and duodenal ulcer The mechanism involves reduced blood flow to the ulcer site and impaired growth of new blood vessels needed for repair.25PubMed. Cigarette smoking delays ulcer healing: role of constitutive nitric oxide synthase in rat stomach If you smoke and have an ulcer, quitting will likely do more for your healing than any single dietary change.
Stress has a complicated and often misunderstood relationship with ulcers. Stress alone does not cause ulcers in the way that H. pylori or NSAIDs do, but people with peptic ulcer disease report significantly higher rates of severe stress and depressed mood than people without ulcers. A population-based study found that severe stress was associated with roughly 60 percent higher odds of having peptic ulcer disease, even after adjusting for smoking, drinking, and other lifestyle factors.26PubMed Central. The association between peptic ulcer diseases and mental health problems Whether stress makes ulcers worse by increasing acid secretion, disrupting sleep and eating patterns, or driving behaviors like smoking and drinking is still debated. Either way, managing stress through whatever works for you is a sensible part of the picture.
Putting Together an Ulcer-Friendly Plate
Practical eating with an ulcer does not require a complicated plan. Build meals around vegetables, fruits with their skins on, whole grains, and lean protein. Include fermented foods like yogurt or kefir regularly. Add broccoli or broccoli sprouts a few times a week if you can. Season with herbs and moderate amounts of chili if you enjoy it and tolerate it. Cut down on packaged snacks, sugary drinks, and heavily salted foods. Skip alcohol while your ulcer is healing, and keep coffee to a level that does not cause symptoms.
Some people find that specific foods bother them even when the research says those foods should be fine. Individual tolerance varies, and there is nothing wrong with avoiding a food that consistently causes you pain, regardless of what a study says. The research gives you a framework, not a rulebook. Pay attention to what your body tells you, especially during the active healing phase, and gradually expand your diet as you improve.
NSAIDs and the Dietary Blind Spot
One thing that often gets overlooked in conversations about ulcer diets is that all the dietary optimization in the world cannot compensate for continued use of the drugs that cause ulcers in the first place. If your ulcer was triggered by regular ibuprofen, naproxen, or aspirin use, the most important “dietary” change is actually a pharmaceutical one: talking to your doctor about switching to a different pain reliever or adding a protective medication. People sometimes focus intensely on cutting out coffee or spicy food while continuing to take the NSAID that started the problem. The food changes described in this article work best when the primary cause of the ulcer is also being addressed, whether that is antibiotic treatment for H. pylori or adjusting your pain-relief strategy.1Medicine. Stomach Helicobacter pylori infection and peptic ulcers