H. pylori: the stomach bacterium behind most ulcers, and how to evict it

Last updated September 3, 2026.

Helicobacter pylori is a spiral bacterium that lives in the stomach lining of roughly half the world's population, and for most carriers it causes nothing at all. But in a significant minority it inflames the stomach (gastritis), causes most peptic ulcers, and raises stomach cancer risk over decades, which is why finding it in the right context means treating it, and treating it means curing the problem.

What does it do?

Most carriers: nothing, ever. In those it affects: chronic gastritis (a gnawing upper-abdominal discomfort, bloating, nausea), peptic ulcers (the burning pain that relates to meals or the night), and, over decades, it is the single biggest risk factor for stomach cancer and a rare stomach lymphoma (MALT), which is why eradicating it cuts those risks meaningfully. It also explains some stubborn indigestion and some unexplained iron-deficiency anemia. It is usually acquired in childhood within families and then persists silently for life unless treated.

How do you catch it?

Person to person, mostly in childhood: through saliva, vomit, and fecal-oral routes within households (shared utensils, close family contact, crowded living, unreliable water in some regions). Infection rates are far higher in childhood in lower-income settings, which is why it clusters in families and why most adults in high-income countries who carry it have done so since they were children. It is not a lifestyle judgment; it is a childhood acquisition from an era before anyone could test for it.

Find answers to your H. pylori infection

Start a free AI doctor consult →

Who gets tested and how is it treated?

When is it an emergency?

H. pylori itself is never an emergency; its complications are: vomiting blood or coffee-ground material, black tarry stools, sudden severe abdominal pain (perforation), fainting or racing pulse (bleeding), and persistent vomiting or unintentional weight loss (which also demand a scope). Long-standing upper-abdominal pain with new anemia, difficulty swallowing, or onset over age 55 belongs to the prompt-investigation list, not the test-and-treat queue. Pymander's escalation routing is built and tested specifically for this class of decision; see the safety architecture working paper.

What a Pymander AI doctor consult looks like

Do you have ulcer-type upper abdominal symptoms (burning, gnawing, meal- or night-related) or a proven ulcer, without vomiting blood, black stools, or weight loss?
My GP found a stomach ulcer on a scope last month and my breath test just came back positive for H. pylori. I feel fine otherwise and I am wondering if treatment is really necessary.
Thanks for giving me all this information. Based on what you've said, treatment is genuinely worthwhile: you have a proven ulcer and a positive test, which makes H. pylori the cause of that ulcer, and eradicating it is what stops the ulcer coming back (untreated, most H. pylori ulcers recur). The course is typically one to two weeks of two antibiotics plus an acid suppressor; it has some pill burden but cures most people, and clearing the infection also removes its long-term stomach-cancer risk. Take every dose, then get the retest a few weeks later to confirm it is gone. Here's your care note to share with your care team.
Care note
H. pylori positive with proven ulcer - eradication indicated
Confirmed gastric ulcer on gastroscopy plus positive H. pylori breath test: eradication therapy indicated (PPI + clarithromycin/amoxicillin 7-14 days, allergy and resistance dependent). Counselled: adherence drives success, eradication prevents ulcer recurrence and reduces gastric-cancer risk; stool or breath retest at >=4 weeks post-treatment and >=2 weeks off PPI to confirm. Alarm features (bleeding, perforation, weight loss, dysphagia) bypass to urgent care.
View care note →

Illustrative example, not a real member's messages.

Common questions

Half the world has this. Why treat mine?

Because carriage is a lottery you have already lost: most carriers never get disease, but you have a proven ulcer, which puts you in the minority where the bacterium is actively causing harm. For that group the calculus is clear: eradication heals the ulcer, prevents its recurrence (untreated H. pylori ulcers come back far more often than not), and removes the long-term cancer risk the infection carries. Treating a symptom-free carrier is a more nuanced, case-by-case conversation; treating someone with an ulcer and a positive test is one of gastroenterology's least controversial recommendations.

How did I get it, and can I give it to my family?

Almost certainly in childhood: H. pylori is acquired young, within households, through saliva and fecal-oral routes (shared utensils, close family contact, and, in some regions, water), and most infected adults have carried it for decades without knowing. Transmission in adulthood is uncommon. The practical family guidance: routine hygiene (hand washing, no sharing of utensils during any vomiting illness) is sensible, and household screening is sometimes discussed when a family member has ulcers or strong family stomach-cancer history, but mass testing of well relatives is not standard. Your treatment protects you; your family carries their own childhood odds.

What is eradication therapy actually like to take?

A busy fortnight: typically a PPI twice daily plus two antibiotics (clarithromycin and amoxicillin, or metronidazole substitutions for penicillin allergy), sometimes with bismuth as a fourth agent depending on local resistance patterns. Expect some side effects: a metallic taste (clarithromycin is famous for it), loose stools, and nausea; they are annoying rather than dangerous and stop when the course does. The critical success factor is taking every dose on schedule: eradication fails mainly through missed pills, and a failed first course means a second with different antibiotics and lower odds. Fourteen days of discipline for a cure is a good trade.

Why do I need a retest afterward?

Because treatment sometimes fails (resistance, a missed dose, bad luck: first-line success is typically 80-90%), and an unconfirmed failure means you still carry the ulcer cause while believing it gone. The retest rules matter: stool antigen or breath test (not blood, which stays positive for years after clearance), done at least four weeks after the antibiotics finish and at least two weeks after stopping the PPI, because both suppress the bacterium enough to false-negative the test. If the retest is positive, a second-line regimen (different antibiotic mix, often bismuth quadruple therapy) gets the job done in most of the remainder.

Does H. pylori really cause stomach cancer?

It is the strongest known risk factor: long-standing H. pylori infection drives a decades-long sequence (chronic gastritis, then in some people atrophy and cell changes, then in a small minority, cancer), and it is classed as a definite carcinogen, linked to the large majority of non-cardia stomach cancers. The scale matters for perspective: most carriers never develop cancer, because host, diet (salt, smoking), and genetic factors shape the progression. The actionable part: eradicating the infection, especially before atrophy sets in, reduces the risk substantially, which is one of the quiet arguments for treating it even beyond ulcer disease.

I have no symptoms. Should I be tested anyway?

Usually population screening is not recommended, but there are sensible exceptions where testing an asymptomatic person is reasonable: a strong family history of stomach cancer (especially a first-degree relative), a household member with an ulcer or treated H. pylori where reinfection is a concern, long-term NSAID use planned, unexplained iron-deficiency anemia, or coming from a high-prevalence region with family cancer history. The principle: test when a positive result changes management. Random testing of the well yields positives that then oblige treatment decisions without a symptom to solve, which is why guidelines keep the bar at the indications above.

Sources

Pymander is not a replacement for a physician and does not provide medical advice, diagnosis, or treatment.

Free AI doctor, 24/7 by textStart a free AI doctor consult