Peptic Ulcers and H. pylori: What Really Causes Them, and How to Manage Them
A peptic ulcer is an open sore in the lining of the stomach or the first part of the small intestine. The main cause is not stress or spicy food, as many people believe, but usually H. pylori infection or regular use of NSAID painkillers. This article explains how ulcers form, their symptoms and complications, how they are diagnosed, and how they are managed alongside your doctor.

You feel a burning or gnawing pain high in your upper abdomen fairly often. Sometimes it comes when your stomach is empty, sometimes after you eat, and it can come with bloating, fullness, or nausea. Maybe you have chalked it up to eating something too spicy or being too stressed, and let it pass, or reached for over the counter antacids again and again. But these symptoms can be a sign of a peptic ulcer, and its real cause is different from what many people assume.
This article walks you through it one layer at a time: what a peptic ulcer is, why stress and spicy food are not the main cause despite the long standing belief, which symptoms and complications to watch for, how it is diagnosed, and how it is managed together with your doctor. The reassuring news first: once the real cause is known, most peptic ulcers can be healed, and understanding how they work is the first step that makes that care land where it should.
What a Peptic Ulcer Is
A peptic ulcer is an open sore in the lining of the upper digestive tract. When the sore is in the stomach, it is called a gastric ulcer. When it is in the duodenum, the first part of the small intestine just past the stomach, it is called a duodenal ulcer. Together these are known as peptic ulcers.
Normally the lining of the digestive tract has a mucus layer and defenses that protect it from the acid the stomach uses to digest food. An ulcer forms when the balance between that acid and the lining’s protection breaks down, letting acid wear through the lining into an open sore. This is why treatment usually involves reducing acid and addressing whatever is weakening the lining in the first place.
The Real Cause Is Not Stress or Spicy Food
The old belief passed down for years is that ulcers come from stress or eating spicy food. Medical understanding has changed a great deal. Research points to two main causes of peptic ulcers.
The first is infection with a bacterium called Helicobacter pylori, or H. pylori for short, a common stomach infection found around the world. It lives in the mucus layer of the stomach and causes chronic inflammation of the lining, which weakens its defenses against acid and can lead to an ulcer. Many people who carry it have no symptoms at all, but in some it leads to ulcers.
The second is regular use of NSAID painkillers, short for nonsteroidal anti inflammatory drugs, such as ibuprofen or aspirin. These medicines relieve pain and inflammation well, but taken regularly over time they interfere with the stomach lining’s protective mechanisms and make ulcers more likely.
As for stress and spicy food, while they can aggravate symptoms or make the stomach feel more uncomfortable in some people, research does not classify them as the main cause of ulcers. Understanding this matters, because blaming stress or food alone can lead you to overlook testing for H. pylori or reviewing your painkiller use, which are the underlying causes that can actually be fixed.
Symptoms to Notice
The most common symptom is a burning or gnawing pain in the middle of the upper abdomen, below the breastbone. This pain often relates to meals: some people hurt more when the stomach is empty or in the middle of the night, and for others the pain changes after eating. Alongside the pain there may be bloating, fullness, nausea, or feeling full sooner than usual.
One thing worth knowing is that some ulcers do not cause clear symptoms and stay silent until a complication such as bleeding occurs, especially in older adults or people who use NSAID painkillers regularly. For that reason, if you have upper abdominal pain that is persistent or keeps coming back, it is not something to brush off.
Complications to Watch For
Most peptic ulcers can be healed, but if left unmanaged they can lead to serious complications. There are three main ones. The first is bleeding, when an ulcer erodes down into a blood vessel. The second is perforation, a hole through the wall of the stomach or intestine, which is a dangerous emergency. The third is obstruction, a blockage that keeps food from passing through properly.
The warning signs of an emergency that mean you should seek urgent care right away include black, tarry stools or stools with blood in them, vomiting blood or material that looks like coffee grounds, sudden severe abdominal pain, or feeling faint. These signs can point to bleeding or perforation and need urgent care. Do not wait to see how it plays out.
How It Is Diagnosed
Diagnosing a peptic ulcer and finding its cause needs a doctor. A common step is testing for H. pylori, which can be done in several ways, such as a breath test, a stool test, or a test from a tissue sample taken during endoscopy. In some cases a doctor may consider an upper endoscopy to look at the ulcer directly and collect tissue samples, especially when there are warning signs or in people who are older.
Which test fits whom depends on symptoms, age, and each person’s risk factors, which a doctor assesses. An accurate diagnosis matters, because if H. pylori is found, clearing it helps the ulcer heal and reduces the chance of it coming back.
Management, Working Together with Your Doctor
Managing a peptic ulcer focuses on addressing the underlying cause and helping the ulcer heal, under a doctor’s care.
If H. pylori is found, international guidance such as the ACG Clinical Guideline from 2017 recommends eradicating it with a combination of several antibiotics together with acid suppression, following a regimen the doctor sets. Clearing the infection requires taking the full combination of medicines exactly as prescribed, not buying antibiotics on your own or taking leftovers from a previous course, because incomplete or incorrect use can fail to clear the infection and can drive antibiotic resistance.
If the cause is NSAID painkillers, a doctor may advise stopping or adjusting them, along with acid reducing medicine to let the ulcer heal. All of these medication decisions should be made together with a doctor, because some people need painkillers or aspirin for other health reasons, so the balance has to be weighed and the right plan found. Do not stop a medicine your doctor has prescribed on your own without asking.
Acid reducing medicines are another key part that gives the lining a chance to heal. As for food, although diet is not the main cause of ulcers, eating regularly and avoiding whatever aggravates your own symptoms, such as alcohol or particular foods you notice do not sit well with you, can help your stomach feel more comfortable while the ulcer heals.
A point of caution: the old belief that ulcers are caused by stress or spicy food is largely a myth.
Most peptic ulcers are caused by H. pylori infection or regular use of NSAID painkillers. Stress and spicy food can aggravate symptoms in some people, but they are not the main cause. And clearing H. pylori requires a specific combination of medicines prescribed by a doctor, not random antibiotics or home remedies. Sources: ACG Clinical Guideline 2017 (PMID 28071659), StatPearls.
When to See a Doctor
See a doctor if you notice these signs:
- Burning or gnawing pain below the breastbone or in the upper abdomen that is persistent or keeps coming back.
- Bloating, fullness, nausea, or feeling full unusually early along with the pain.
- Regular use of NSAID painkillers or aspirin together with stomach pain.
- Warning signs of bleeding, such as black stools, vomiting blood or coffee ground material, sudden severe abdominal pain, or feeling faint, in which case you should seek urgent care right away.
What you can start doing as early as tomorrow is this: if you have persistent upper abdominal pain, see a doctor for an assessment, and ask whether testing for H. pylori makes sense in your case. Another step you can take right away is to review how often you use NSAID painkillers and tell your doctor, so you can work out a suitable plan together. And most importantly, do not ignore the warning signs of bleeding described above, because seeing a doctor early helps prevent serious complications.
This content is general information for health care, not advice that replaces seeing a doctor. Diagnosing and managing a peptic ulcer, including any decision about antibiotics and acid reducing medicines, should always be done together with a human doctor or specialist.



Read next
More in this category

Dietary Fiber, the Gut, and Metabolic Health: A Short Guide to LDL, Post-Meal Glucose, Microbes, and Fullness
A short guide to dietary fiber, the gut, and metabolic health, covering how soluble and viscous fiber is linked to lower LDL cholesterol, gentler post-meal glucose, short-chain fatty acids from gut microbes, and greater fullness, with the population-level effect sizes, the limits, who should be careful, and how to start adding fiber gradually with water, while treating every number as guidance to adjust with a doctor or dietitian.
Read article
Caffeine and Health: What It Is, How Much Is Reasonable, and Who Should Be Careful
A short guide to caffeine and health, covering how caffeine works, where it hides, the amount often cited as reasonable for most healthy adults, why too much or too late disrupts sleep and causes jitteriness, who should have less or none, and how to start looking after yourself, while treating every number as guidance a doctor tailors to you.
Read article
Celiac Disease: What It Is, How It Is Diagnosed, Why You Must Be Tested Before Quitting Gluten, and How to Manage It
A short guide to celiac disease, covering what it is, what gluten does to the small intestine, how wide the symptoms can be, how it is diagnosed, why testing must happen while you are still eating gluten, and how to start looking after yourself.
Read articleVerifiable
References for this article
- 1 Chey WD et al. ACG Clinical Guideline: Treatment of Helicobacter pylori Infection (Am J Gastroenterol 2017, PMID 28071659) pubmed.ncbi.nlm.nih.gov
- 2 StatPearls (NCBI Bookshelf NBK534792): Peptic Ulcer Disease ncbi.nlm.nih.gov
- 3 NIDDK (NIH): Peptic Ulcers (Stomach Ulcers) niddk.nih.gov
Reviewed by Health Coach: A888