H. pylori is a common stomach bacterium, best known for causing ulcers and indigestion rather than headaches. Yet people with migraine carry it noticeably more often than people without migraine.1PubMed Central. Association between Helicobacter pylori infection and migraine: A meta-analysis The infection looks like a possible contributor that may worsen headaches in some people, not a direct cause. The possibility matters in practice because the infection can be cleared with a short course of medicine.
How Strong the Link Between H. Pylori and Migraine Really Is
Across five studies of about 900 people, roughly 45% of migraine sufferers had H. pylori, compared with about 33% of people without migraine.1PubMed Central. Association between Helicobacter pylori infection and migraine: A meta-analysis That makes people with migraine noticeably more likely to be infected. One study found a bigger gap: nearly 78% of migraine patients carried the bacterium versus about 51% of people without migraine.2PubMed. Helicobacter pylori infection in migraine headache: a true association or an innocent bystander? Still, since about a third of people without migraine also carry it, most infected people do not get migraines from it. Pooled figures come from studies that differ in how they defined migraine, which tests they used, and who they recruited, so no single figure should be treated as your personal risk.
Where you live seems to matter. The link was strong in Asian patients, with infection roughly three and a half times more likely among those with migraine.1PubMed Central. Association between Helicobacter pylori infection and migraine: A meta-analysis In European patients, the difference was small enough that it could be chance.1PubMed Central. Association between Helicobacter pylori infection and migraine: A meta-analysis The connection may depend on local strains of the bacterium or other regional factors. If you live in Europe or North America, the strongest evidence comes from people living elsewhere, so it may describe you less well.
Large surveys complicate the picture further. In a survey of over 1,300 people, being infected did not make someone more likely to have headaches at all.3PubMed. A cross-sectional study on the association between Helicobacter pylori infection and headache But among people who already had headaches, infection was tied to having them more often.3PubMed. A cross-sectional study on the association between Helicobacter pylori infection and headache H. pylori may be more of a frequency booster than a starter of headaches.
Being linked is not the same as causing. People with frequent headaches often take painkillers that upset the stomach, which prompts more stomach testing and so more diagnoses. Only treatment trials can show whether removing the bacterium changes headaches. If you just tested positive, your infection may have nothing to do with your headaches, since most infected people don’t have migraine.
How a Stomach Infection Might Affect Your Head
Chronic inflammation is the main theory. H. pylori keeps the stomach lining in a constant low-level inflamed state.4PubMed Central. Gut-brain Axis and migraine headache: a comprehensive review The body then releases inflammatory and blood-vessel-active chemicals that may make the brain’s pain-sensing structures more sensitive.4PubMed Central. Gut-brain Axis and migraine headache: a comprehensive review The infection can also raise levels of CGRP, a chemical that newer migraine drugs are designed to block.4PubMed Central. Gut-brain Axis and migraine headache: a comprehensive review And it may alter serotonin, a brain chemical long tied to migraine.4PubMed Central. Gut-brain Axis and migraine headache: a comprehensive review
Some strains are more aggressive. Strains carrying a particular toxin-producing gene cause stronger inflammation. Among infected people, about 41% of those with migraine with aura, the kind preceded by visual flashes or zigzags, carried these strains versus about 19% with migraine without aura.5PubMed. Association between Helicobacter pylori cytotoxic type I CagA-positive strains and migraine with aura So more aggressive strains may matter most for migraine with aura. Your strain type is rarely tested in routine care, so this is mostly background.
Nutrient shortfalls may play a part too. H. pylori can damage stomach cells needed to absorb vitamin B12.6PubMed Central. Helicobacter pylori Infection in Children: A Possible Reason for Headache? Iron deficiency anemia is one of the better-supported effects of the infection outside the stomach.7PubMed Central. Extraintestinal manifestations of Helicobacter pylori: A concise review Low B12 or iron, both known to cause tiredness and headaches, could be an indirect route. A simple blood test can check both, and correcting a shortage can ease fatigue and headaches whatever the cause. If you have the infection and frequent headaches, asking for this test is reasonable.
Not every proposed route holds up. One study found infection did not change blood levels of nitric oxide, a vessel-widening chemical linked to migraine.8Cephalalgia. Helicobacter pylori infection and migraine Another found lower levels in migraine sufferers.9PubMed. Migraine, Helicobacter pylori, and oxidative stress This part of the explanation remains unclear.
Most of these routes come from lab measurements, which show that a change occurs, not that it triggers a headache. No study has shown step by step that stomach inflammation sets off a migraine attack in a person.
Will Treating H. Pylori Help Your Headaches
Treatment to clear the infection usually combines two antibiotics with a stomach-acid reducer for 10 to 14 days. A placebo-controlled trial in Iranian migraine patients found that clearing the infection eased their headaches.10PubMed. The effect of Helicobacter pylori eradication on migraine: a randomized, double blind, controlled trial A review of such trials judged the improvement similar to that from common migraine medicines.11PubMed. Association of Helicobacter pylori with migraine headaches and the effects of this infection and its eradication on the migraine characteristics in adults: A comprehensive systematic review and meta-analysis Other controlled trials have reported fewer or milder migraines after treatment.12PubMed Central. Migraine as a Disease Associated with Dysbiosis and Possible Therapy with Fecal Microbiota Transplantation
The acid reducer is included because lowering stomach acid helps the antibiotics work better. Your doctor may choose different antibiotics depending on your allergies and the drugs you’ve taken before.
The trials are few and small, and they come mainly from regions where the link is strongest. Matching common migraine medicines is encouraging, but it doesn’t make treatment a replacement for them. Improvement is possible but not guaranteed. Keep taking your usual migraine treatment unless your doctor says otherwise.
To tell whether treatment helped, start a headache diary noting frequency and severity before you begin, and keep it going for two to three months afterward, since changes may be gradual. Ask for a follow-up breath or stool test about four weeks after finishing to confirm the bacterium is gone. Bring the diary to your doctor to judge any change.
A confirmed infection is usually treated anyway, to prevent ulcers and lower stomach cancer risk, so any headache relief is a bonus. Finishing every dose matters, because incomplete courses breed antibiotic resistance.
Headaches From H. Pylori Treatment Itself
Headache and a pounding heartbeat were among the mild side effects reported with a 10-day treatment course.13PubMed. Ten-day sequential therapy of Helicobacter pylori infection in Thailand Other common effects include a metallic taste, nausea, and loose stools. The regimen combines several drugs at once, so it’s hard to pin a headache on one of them. A new headache during treatment is therefore more likely from the medicines than from the infection. If side effects feel hard to manage, call your doctor rather than stopping early.
Taking doses with food, if the label allows, can reduce nausea. Avoid alcohol, since some regimens react badly with it. Ask your pharmacist which pain reliever is safe, because some irritate the stomach.
Headaches that resemble your usual attacks, with throbbing pain, nausea, or light sensitivity, may be a migraine rather than a medicine effect, though the two can be hard to tell apart. Severe, sudden, or very different headaches need prompt medical attention.
Headaches caused by the medicines usually fade within days of the last dose. If your headaches persist or worsen well after you finish, they are less likely to be a medicine effect and are worth raising at your follow-up.
Should You Get Tested if You Have Migraines
Studies tying the infection to migraine often found it alongside indigestion.14PubMed Central. Association Between Helicobacter pylori Infection and Migraine: A Systematic Review Having both stomach discomfort and migraines is a reasonable reason to ask about testing. Headache frequency, rather than having headaches at all, showed the link in a large survey,3PubMed. A cross-sectional study on the association between Helicobacter pylori infection and headache so people with very frequent attacks have more reason to check.
When you bring it up, describe stomach symptoms and headache frequency together. Mention the medicines you take, including acid reducers and painkillers, and ask whether a positive result would change your headache plan. Be prepared that many doctors won’t test for headaches alone.
Breath and stool tests detect a current infection, while blood antibody tests can stay positive after it is gone, so ask for a breath or stool test. Acid-reducing pills and recent antibiotics can cause false negatives, so you may need to pause them for about two weeks first. For a breath test you usually fast for several hours, then swallow a small solution and breathe into a bag at set times. A stool test needs a small sample collected at home and returned to the lab. Check the instructions for the exact pause time, and ask before stopping any medicine you take for another condition.
A positive result confirms a current infection but doesn’t prove it’s behind your migraines. A negative result, if you paused acid reducers as instructed, makes a current infection unlikely and lets you focus on other causes.
Other causes deserve a look too. Overusing painkillers can itself cause near-daily headaches, and common ones like ibuprofen can cause stomach symptoms that mimic H. pylori. Sleep, caffeine, and hormonal changes remain more common migraine triggers.
Children are a different case. In children with recurrent vomiting spells and abdominal migraine, the infection was no more common than in other children.15International Journal of Pediatrics and Adolescent Medicine. Is Helicobacter pylori infection a risk factor for childhood periodic syndromes? The adult migraine link should not be assumed for children’s headaches.

