H. pylori and Stomach Ulcers: Why Diet Isn't the Cure, and What Actually Works

15 August 2026
MIT
H. pylori and Stomach Ulcers: Why Diet Isn't the Cure, and What Actually Works

Helicobacter pylori (H. pylori) is a bacterium that lives in the lining of the stomach, and it is the most common cause of stomach and duodenal ulcers — not stress, and not spicy food. That shift in understanding changed medicine: an ulcer became a condition with a findable cause, detectable by a simple test and treatable with a defined course, instead of a chronic complaint managed with bland diets. But the old advice outlived the old theory. Avoid spices, drink milk, calm down. The problem is that this advice, at its very best, softens the feeling of pain without touching the cause. This guide explains what the bacterium actually does, why your test can come back wrong, why treatment is incomplete without a follow-up test, and where food honestly stands in all of it.


What is H. pylori, and why does it matter more than stress and spices?


H. pylori is a spiral-shaped bacterium that settles into the mucous layer covering the stomach lining. What makes it remarkable is that it survives in an environment its own acidity is supposed to sterilise. The StatPearls review hosted by the US National Library of Medicine describes four tools it uses: urease activity that counteracts gastric acidity, flagella-mediated motility that moves it toward the gastric epithelial cells, adhesins that bind host cell receptors, and effector proteins such as CagA and VacA that cause tissue damage. The result is chronic inflammation of the lining that, in a subset of those infected, progresses to an ulcer.


The same source lists the transmission routes: faecal-oral, gastric-oral, oral-oral and sexual. In other words, this is an infection passed between people, usually acquired in childhood and often within a single household. That one fact explains why several members of the same family test positive, and it has a practical consequence we will return to.


The myth that died in science and survived in the living room


The clearest statement comes from Mayo Clinic, verbatim: "Stress and spicy foods do not cause peptic ulcers. But they can make symptoms worse." Going further, the US National Institute of Diabetes and Digestive and Kidney Diseases (NIDDK) states that researchers "have not found that diet and nutrition play an important role in causing, preventing, or treating peptic ulcers," and that doctors do not generally recommend special diets for people with ulcers.


Read that sentence as it is, because it is the key: food is not the cause of an ulcer, and food is not the cure. What you eat may change how much pain you feel, and that is a real gain — but it does not kill a bacterium and it does not heal an erosion. Someone treating an ulcer with milk and restriction alone may feel better for weeks while the cause sits exactly where it was.


Does everyone with H. pylori get an ulcer?


No — and this is one of the most important points of balance in the whole subject. Cleveland Clinic notes that the bacterium "affects more than half of the world's population" yet "doesn't cause illness in most people." The StatPearls review puts global prevalence at up to 50% of the population, higher in developing countries. The reference volume from the International Agency for Research on Cancer (IARC), part of the World Health Organization, cites a global prevalence of 48% across data from 62 countries, ranging from 70% in Africa to 24% in Oceania, while a more recent review put crude global prevalence at 44% in adults and 35% in children and adolescents in 2015–2022.


Put plainly: carrying H. pylori is very common; complications are not. That is not a reason to ignore it. It is a reason not to panic — and to base the decision on symptoms and risk factors rather than on fear.


What are the symptoms, and when is it an emergency?


Mayo Clinic describes the common ulcer symptoms as "dull or burning stomach pain," a feeling of fullness or bloating, belching, heartburn and nausea. NIDDK adds feeling full too soon during a meal or uncomfortably full after it. Cleveland Clinic lists accompanying symptoms including unexplained weight loss, loss of appetite and indigestion.


But the part that must not be skimmed is bleeding.


Red flags that need immediate medical assessment


  • Vomiting blood, which Mayo notes "may appear red or black."
  • Black or tarry stools, or dark blood in the stool.
  • Dizziness or fainting.
  • Sudden, severe abdominal pain — a possible perforation.
  • Unintentional weight loss, difficulty swallowing, or repeated vomiting that prevents eating.


These are not symptoms to watch at home. NIDDK notes that ulcers can lead to bleeding, perforation, penetration or obstruction — complications treated in hospital, not with a diet.


Why can an H. pylori test give you the wrong answer?


This is the most practically useful section of this article, and the one patients are told about least.


A blood test does not tell you about "now"


The blood antibody test (serology) measures an immune response, not the presence of living bacteria. The 2024 clinical guideline from the American College of Gastroenterology (ACG) explains why: "Because antibody levels can remain detectable for months to years after successful eradication of H. pylori infection, serological testing should not be used to establish post-treatment status." It adds that serology "is not recommended in low-prevalence populations in the absence of a high pre-test probability." StatPearls describes IgG serology as having "poor sensitivity" and being "not reliable for use in the clinical setting."


The practical translation: if you had a blood test after a previous course of treatment and it came back positive, that does not prove the infection is still there. If a decision to re-treat rests on that result alone, you may take antibiotics you do not need.


The rule most patients are never told


The tests that tell you about active infection are the urea breath test and the stool antigen test — both described by StatPearls as having high sensitivity and specificity — along with biopsy at endoscopy. But they come with a decisive condition: proton pump inhibitors (such as omeprazole) must be stopped before testing, and so must antibiotics and bismuth.


The numbers are specific. StatPearls advises waiting "at least 2 weeks after stopping proton pump inhibitors (PPIs) and 4 weeks after stopping antibiotics." The 2024 ACG guideline states the same principle: PPIs "can result in false-negative urea breath tests and fecal antigen tests, [so] they should be stopped for 2 weeks," and patients "should also avoid bismuth and antibiotics for at least 4 weeks."


This explains a scenario that repeats constantly. Someone has stomach pain, takes an acid suppressant for weeks, then has a breath or stool test — which comes back negative. They leave reassured while still infected. A negative result in that situation does not mean no infection; it means the drug pushed the bacteria temporarily below the detection threshold. If you are on an acid suppressant and you are sent for a test, ask your doctor directly: should I stop it two weeks beforehand?


Why does H. pylori treatment sometimes fail?


Because the bacterium has become more resistant to antibiotics — not because the patient "didn't follow the diet."


The 2024 ACG guideline overturned the old default: it recommends against using PPI-clarithromycin triple therapy unless clarithromycin sensitivity has been proven. The reason is a blunt number: "In the face of known clarithromycin resistance, standard PPI-clarithromycin triple therapy achieves H. pylori eradication in fewer than a third of patients." The guideline notes US resistance rates currently running at 20%–30% for clarithromycin, implying empiric success of "70% or less."


The regional picture is no better. A review of H. pylori epidemiology in Saudi Arabia published in the Bosnian Journal of Basic Medical Sciences reports local resistance in a later study of 23.3% for clarithromycin and 48.5% for metronidazole, and concludes that "clarithromycin resistance in Saudi Arabia exceeds 15%, [so] quadruple therapy for 10–14 days should be considered." That aligns with the ACG's first-line recommendation of optimised bismuth quadruple therapy for "10 to (preferably) 14 days."


The same review shows how widely reported prevalence varies inside Saudi Arabia — from 10.2% to 96% depending on region, population studied and testing method (10.2% by stool antigen in Riyadh in 2018, versus 96% among duodenal ulcer patients in Aseer in the early 1990s). That spread is not a contradiction; it is the product of different samples, eras and tools, and we report it as a range rather than offering one misleading number.


An important note: which drugs, at which doses, for how long, is a purely medical decision that depends on your drug history, penicillin allergy status and what you have already tried. There is no self-administered recipe in this article — and there should not be one in any article.


The test of cure: the step that turns treatment into a cure


Here is the single most useful practical sentence in this guide: finishing the course does not mean the infection is gone.


The 2024 ACG guideline is categorical: "proof of H. pylori eradication is required in all patients after treatment by obtaining a fecal antigen test, urea breath testing, or gastric biopsy." Timing is part of the recommendation: "at least 4 weeks after completion of therapy," and after being off PPIs for at least 2 weeks.


Why does this matter so much? Because a meaningful share of treatments fail silently. The patient finishes two weeks, the pain improves (because the acid suppressant eases the symptom), and the file is considered closed — while the bacteria remain. Months later the pain returns, gets blamed on "stress" or "food," and the cycle restarts.


In a Saudi cross-sectional study in the Riyadh region of 808 participants (October 2021 – June 2022), 80.32% started the prescribed treatment while 19.68% did not start it at all, and good treatment compliance reached 70.54%. On knowledge, 82.5% knew the infection causes gastric and duodenal ulcers, but 48.6% were unaware of its link to gastric cancer, and 60.52% did not realise it was a bacterium in the first place. The gap is not in having heard the name — it is in knowing what it means and what it requires.


How is H. pylori linked to stomach cancer?


This section needs precision: the link is real and established, but it is probabilistic, not inevitable.


IARC classifies H. pylori as a group 1 carcinogen, as StatPearls notes; the same review records that H. pylori is found in more than 75% of gastric MALT lymphoma cases. On global burden, the IARC reference volume reports that in 2022 there were 969,000 new gastric cancer cases (4.8% of all cancer cases) and 660,000 deaths (6.8% of all cancer deaths), and that about 76% of the gastric cancer burden in the studied birth cohorts was attributable to H. pylori infection — meaning, in principle, preventable.


At the same time, Cleveland Clinic states plainly that H. pylori is a risk factor for stomach cancer "but most people with H. pylori won't develop it." The US National Cancer Institute notes that "most experts agree that the available evidence does not support widespread testing for and eradication" in the general population, and that screening is recommended for defined groups such as people with active ulcers or a documented history of them.


The number worth paying attention to: family


The clearest evidence that treatment changes outcomes came from a randomised trial published in the New England Journal of Medicine in 2020, enrolling 1,676 first-degree relatives of gastric cancer patients with a median follow-up of 9.2 years. Gastric cancer was diagnosed in 1.2% of those treated versus 2.7% on placebo (hazard ratio 0.45, 95% CI 0.21–0.94).


But the more important figure is the next one: comparing participants with confirmed eradication against those with persistent infection, the rates were 0.8% versus 2.9% (hazard ratio 0.27, 95% CI 0.10–0.70). The benefit, in other words, lives in confirmed success — not in merely taking the medication. That is precisely what makes the test of cure something other than paperwork.


And because the infection moves within households, the 2024 ACG guideline lists among its testing indications: "Adult household members of individuals who have a positive non-serological test for H. pylori." If someone in your home tests positive, the logical question for your family doctor is whether the rest of you should be tested too.


What about painkillers? The second cause everyone forgets


NIDDK names H. pylori infection and nonsteroidal anti-inflammatory drugs (NSAIDs) as "the most common causes of peptic ulcers." Mayo Clinic explains that "taking aspirin or nonsteroidal anti-inflammatory drugs (NSAIDs) over time can irritate or inflame the lining of the stomach and small intestine," and lists risk factors including age over 60, a prior ulcer, high-dose NSAID use, smoking (which may raise risk in people infected with H. pylori) and alcohol.


Practically: if you take a drug from this family almost daily — for joint pain, chronic headaches or your back — that is information your doctor needs before your stomach pain is attributed to H. pylori or to food alone.


So what role does food play? An honest answer


Food does not treat the infection and does not heal the ulcer, but it does affect your day-to-day comfort during symptoms and during treatment — a legitimate goal in its own right. The reasonable principles are comfort principles, not treatment principles:


  • Smaller, more frequent meals instead of one large meal that loads the stomach.
  • Track your own triggers rather than a universal blacklist. Spices do not cause ulcers, but if they worsen your pain, easing off temporarily is a sensible personal decision.
  • Stop smoking — it is named explicitly as a risk factor in the ulcer literature.
  • Do not stay on acid suppressants indefinitely without medical review; they ease the symptom, can mask the diagnosis, and can invalidate your test result as explained above.
  • Never self-treat with antibiotics, or with what is left of a relative's prescription. That behaviour is exactly what built the resistance problem.


If your discomfort is more of a burning that rises into the chest, our guide to acid reflux and GERD may fit your situation better; if bloating and gas are the main complaint, see our article on bloating and gas. These are different conditions from an ulcer, and telling them apart is not the reader's job.


Who should be careful, and when should you see a doctor?


See a doctor — do not settle for an article — if you have persistent or recurrent stomach pain, regular NSAID use, a family history of gastric cancer, alarm symptoms (weight loss, difficulty swallowing, repeated vomiting, anaemia, black stools), new symptoms at an older age, or a positive H. pylori test that was never followed by a test of cure. The same applies if you are pregnant, on blood thinners, or allergic to penicillin — each of those changes the treatment plan.


This article is educational only and does not replace consulting your doctor or a clinical diagnosis. Do not start treatment, stop treatment, or arrange a test based on what you have read here alone.


Where does Bakery 8 fit into any of this?


Let us say it plainly first: no bread treats H. pylori, and no food product replaces a test or a course of treatment. Anyone selling you "food that kills H. pylori" is selling an unsupported claim. What we can honestly say is smaller and more realistic. During symptoms and treatment appetite changes, small quiet meals become easier, and reaching for "something sweet to settle the stomach" becomes a daily habit that quietly turns into an unnecessary sugar load. That is the only place our products belong:


  • Bread and toast made with almond flour and no added sugar — the base of a small, quiet meal when your stomach cannot take a heavy one.
  • Crackers and manakish — a small savoury option between meals instead of postponing food until one large meal.
  • Keto granola — a direct swap for sweetened breakfast cereal on a morning when you do not want concentrated sugar.
  • Sugar-free chocolate, desserts and cake — because a plan that removes everything is a plan nobody keeps.


And by the same standard we apply to everyone else: if you notice one of our products personally worsens your discomfort, stop it. The measure is how you feel, not the name on the packaging.


Frequently asked questions about H. pylori


Is H. pylori contagious between family members?


Yes. StatPearls lists faecal-oral, gastric-oral and oral-oral transmission, and Cleveland Clinic describes direct person-to-person spread as well as contaminated food or water. This is why the 2024 ACG guideline includes adult household members of someone with a positive non-serological test among its testing indications. The decision is made with your family doctor.


Can H. pylori be cured without antibiotics?


There is no proven dietary substitute that eradicates the infection. The treatment endorsed by the 2024 ACG guideline is a combination of medicines taken together for 10–14 days, with the specific regimen chosen by your doctor. Foods and drinks may ease how symptoms feel, which is a completely different thing from eliminating the bacteria.


Why was my H. pylori test negative when my symptoms continue?


One common reason is that you were taking an acid suppressant or an antibiotic before the test. StatPearls advises waiting at least 2 weeks after stopping PPIs and 4 weeks after stopping antibiotics, and the 2024 ACG guideline confirms these can cause false-negative results. Tell your doctor everything you are taking before you are tested.


Is a blood test enough to diagnose H. pylori or confirm a cure?


No — especially not to confirm a cure. The 2024 ACG guideline states that antibody levels can remain detectable for months to years after successful eradication, and therefore "serological testing should not be used to establish post-treatment status." A urea breath test or a stool antigen test are the appropriate options for confirmation.


When should the test of cure be done?


Per the 2024 ACG guideline: at least 4 weeks after completing therapy, with PPIs stopped for 2 weeks beforehand and bismuth and antibiotics avoided for 4 weeks. It is recommended for all patients after treatment — it is not optional.


Does H. pylori always lead to stomach cancer?


No. It is classified as a group 1 carcinogen and about 76% of the gastric cancer burden is attributed to it in the IARC reference, but Cleveland Clinic emphasises that most infected people will never develop it. The probability rises; inevitability does not apply. The medical decision depends on your own situation and family history.


The bottom line


A stomach ulcer is no longer a mystery managed with milk and patience. It has two dominant causes — H. pylori and anti-inflammatory painkillers — tests that identify it accurately when done under the right conditions, a treatment of defined length, and a final step many people skip: a test proving the infection is actually gone. Start with the easiest step, which is not a dietary change at all: a call to your doctor asking which test fits your situation and when to do it.


In the meantime, what we offer at Bakery 8 / مخبز ثمانية — a keto, sugar-free and gluten-free bakery in Riyadh, Saudi Arabia — is what we can actually deliver: everyday options with no added sugar, gentle on your routine, and honest about what they are. Browse the bread and granola ranges at getbakery8.com.


References


  1. Rasheed F., et al. Helicobacter Pylori. StatPearls, National Library of Medicine (NCBI Bookshelf), 2024.
  2. National Institute of Diabetes and Digestive and Kidney Diseases (NIDDK). Peptic Ulcers (Stomach Ulcers). NIH.
  3. Mayo Clinic. Peptic ulcer — Symptoms and causes.
  4. Cleveland Clinic. H. pylori Infection.
  5. Chey W.D., et al. ACG Clinical Guideline: Treatment of Helicobacter pylori Infection. American College of Gastroenterology, 2024.
  6. International Agency for Research on Cancer (IARC/WHO). Population-Based Helicobacter pylori Screen-and-Treat Strategies for Gastric Cancer Prevention — epidemiology chapter, NCBI Bookshelf, 2024.
  7. National Cancer Institute (NCI). Helicobacter pylori and Cancer — Fact Sheet.
  8. Choi I.J., et al. Family History of Gastric Cancer and Helicobacter pylori Treatment. New England Journal of Medicine, 2020;382:427–436 (figures via the American College of Gastroenterology summary).
  9. Alsulaimany F.A., et al. Epidemiology, pathogenicity, risk factors and management of Helicobacter pylori in Saudi Arabia. Bosnian Journal of Basic Medical Sciences.
  10. Alanazi A., et al. Awareness and Practice of Patients with Helicobacter pylori Infection Toward their Disease in the Riyadh Region, Saudi Arabia. 2024 (n=808).
  11. Hooi J.K.Y., et al. Global Prevalence of Helicobacter pylori Infection: Systematic Review and Meta-Analysis. Gastroenterology, 2017 (via the IARC reference).


Related keywords: H. pylori, Helicobacter pylori symptoms, H. pylori test, urea breath test, stool antigen test, stomach ulcer, peptic ulcer causes, test of cure, clarithromycin resistance, stomach cancer prevention.