Stomach ulcers: real causes, myths about food and stress, and treatment
Many people think spicy food or stress causes stomach ulcers. The main causes are actually a germ called H. pylori and pain relievers like ibuprofen. Here is what to know about symptoms, treatment and warning signs.

For years, people believed stomach ulcers came from stress or spicy food. We now know the two most common causes are a germ and some everyday pain medicines.
Here is what peptic ulcers are, what really causes them, how they are treated and when to get help fast.
- A peptic ulcer is a sore in the lining of the stomach or the first part of the small intestine.
- The most common causes are an infection with H. pylori bacteria and long term use of pain relievers called NSAIDs, like ibuprofen and aspirin.
- NIDDK says research has not found that diet plays an important role in causing, preventing or treating ulcers.
- Ulcers are treated with medicine that lowers stomach acid, plus antibiotics if H. pylori is the cause.
- Get help right away for black or bloody stool, vomit that looks like blood or coffee grounds, or sudden severe belly pain.
What a peptic ulcer is
Peptic ulcers are sores in the lining of your stomach or your duodenum, which is the first part of your small intestine. They are also called stomach ulcers or duodenal ulcers. The National Institute of Diabetes and Digestive and Kidney Diseases, or NIDDK, notes that ulcers can lead to serious problems if not treated.
Symptoms
NIDDK lists these symptoms:
- Pain or discomfort in the upper belly, between the belly button and the breastbone. This is the most common symptom.
- Pain that feels dull or burning and comes and goes
- Pain when your stomach is empty or at night that eases for a while after eating, or pain that gets worse after eating
- Feeling full too soon, or too full after a meal
- Bloating, burping, nausea or vomiting
NIDDK also says many people with ulcers have no symptoms until a problem develops.
What causes ulcers
| Cause | What to know |
|---|---|
| H. pylori infection | A common germ. It may spread through contact with an infected person's saliva, vomit or stool, or through food or water. |
| NSAIDs | Pain relievers like aspirin, ibuprofen and naproxen. They make the stomach lining easier to damage. The risk is higher with long term use, high doses, or using them with other medicines that raise ulcer risk. |
| Less common causes | Some other medicines and infections, surgery and some health conditions |
If you take NSAIDs often for pain, talk with your doctor. Our post on movement for low back pain covers non drug ways to manage a common type of pain.
Myths about food and stress
NIDDK says researchers have not found that diet and nutrition play an important role in causing, preventing or treating peptic ulcers. It says doctors do not recommend a special diet or cutting out specific foods or drinks for ulcers.
| Myth | What we know |
|---|---|
| Spicy food causes ulcers | NIDDK lists H. pylori and NSAIDs as the common causes, not spicy food. |
| You need a bland diet to heal | NIDDK says doctors do not recommend a special diet for ulcers. |
| Milk soothes ulcers | No special food is recommended to treat ulcers. Medicine is the treatment. |
| Ulcers come from stress | H. pylori and NSAIDs are the most common causes. |
That said, if a food bothers your stomach, it makes sense to eat less of it. And managing stress is good for your health in many ways. Our post on stress and your body has tips.
Smoking matters
NIDDK says smoking can slow ulcer healing, and quitting can lower your risk of getting ulcers. If you smoke, ask your doctor about help to quit.
How ulcers are treated
NIDDK describes these treatments:
| Treatment | What it does |
|---|---|
| Proton pump inhibitors (PPIs) or H2 blockers | Lower stomach acid so the ulcer can heal |
| Antibiotics | For H. pylori. Two or more antibiotics are used together with a PPI, and sometimes bismuth. |
| Medicine changes | For NSAID ulcers, your doctor may stop the NSAID, lower the dose or switch you to another pain medicine. |
Finish all your antibiotics
If you are treated for H. pylori, NIDDK says to take every dose as prescribed. Stopping early may let some bacteria survive. Your doctor may test again at least 4 weeks after you finish to make sure the infection is gone.
Warning signs that need care right away
NIDDK says to call or see a doctor right away if you have:
- Black or tarry stool, or red or maroon blood in your stool
- Red blood in your vomit, or vomit that looks like coffee grounds
- Sudden, sharp or severe belly pain that does not go away
- Dizziness or fainting
- A fast pulse or other signs of shock
- Ulcer symptoms that change or get worse
Eating well while you heal
Since there is no special ulcer diet, a normal healthy eating pattern is a good choice. The Dietary Guidelines for Americans, 2025 to 2030, encourage vegetables, fruits, whole grains, protein foods and dairy, with less added sugar and fewer highly processed foods. Our balanced plate guide shows how to build a meal.
How ulcers differ from heartburn
Both can cause burning pain in the upper belly or chest. Heartburn happens when stomach acid comes back up into your food pipe. An ulcer is a sore in the stomach or small intestine lining. Because the symptoms can overlap, see your doctor if you have frequent or ongoing pain.
FAQ
Can I take ibuprofen if I have had an ulcer?
Ask your doctor first. NSAIDs are a common cause of ulcers. Your doctor may suggest another pain medicine or add a PPI.
Is H. pylori contagious?
NIDDK says it may spread through contact with an infected person's saliva, vomit or stool, or through food or water.
Do I need to avoid coffee?
NIDDK says doctors do not recommend avoiding specific foods or drinks for ulcers. If something bothers you, cut back.
Can ulcers come back?
They can, especially if the cause is not treated. Finishing H. pylori treatment and limiting NSAIDs can help.
This post is for general information. See your doctor if you have ongoing belly pain, and get care right away for signs of bleeding.
For more simple, science based tips, get our free 7 day gut reset.
Sources: NIDDK, Symptoms and Causes of Peptic Ulcers. NIDDK, Treatment for Peptic Ulcers. NIDDK, Eating, Diet and Nutrition for Peptic Ulcers. Dietary Guidelines for Americans, 2025 to 2030.
Get new posts by email.
Pick a short weekly email, or one calm digest a month.


