If you have an ulcer, the burning pain in your upper belly is probably the first thing you think about. The second thing you think about is what you ate or drank that made it worse. The truth is that the main drivers of peptic ulcers are not foods at all — they are a bacterial infection called Helicobacter pylori and, in many cases, regular use of nonsteroidal anti-inflammatory drugs (NSAIDs). But certain foods, drinks, and daily habits can absolutely aggravate the pain and slow healing, even if they did not cause the ulcer in the first place.
What Actually Causes a Peptic Ulcer?
For decades, people were told that stress and spicy food caused ulcers. That turned out to be wrong. The two dominant causes are H. pylori infection and NSAID use.
H. pylori is a bacterium that lives in the stomach lining. It is extremely common worldwide. In many people it causes no symptoms at all, but in others it weakens the protective mucus layer of the stomach or duodenum, allowing acid to damage the tissue underneath. This is the most common cause of peptic ulcers globally.
NSAIDs — ibuprofen, naproxen, aspirin, and others — work by blocking enzymes called cyclooxygenases. That reduces pain and inflammation, but it also reduces the production of prostaglandins that help protect the stomach lining. With less protection, acid causes damage. Some people develop ulcers from NSAIDs even without H. pylori.
Less common causes include Zollinger-Ellison syndrome (a rare condition causing excess acid production), certain cancers, and severe physiological stress such as major burns or critical illness.
This distinction matters because it shapes what actually helps. If H. pylori is present, antibiotic treatment is the cornerstone of healing. If NSAIDs are the cause, stopping them — when medically safe to do so — is the priority. Food choices and habit changes are supportive, not curative.
What Aggravates Ulcers: Foods and Habits That Make Symptoms Worse
Certain foods and habits reliably worsen ulcer symptoms in many people, even though they do not cause the ulcer itself.
Foods and drinks commonly reported to aggravate ulcer pain
- Spicy foods — capsaicin and other compounds can irritate an already inflamed stomach lining, though research does not show they cause ulcers
- Citrus fruits and juices — high acidity can increase discomfort for some people
- Coffee and caffeine — stimulates gastric acid secretion, which can worsen pain
- Alcohol — directly irritates the stomach lining and increases acid production
- Carbonated drinks — can cause bloating and increase pressure in the stomach
- High-fat or fried foods — slow stomach emptying, which prolongs acid exposure
- Tomato-based products — acidic and often reported as a trigger
- Chocolate — contains caffeine-like compounds and can relax the lower esophageal sphincter
Not everyone reacts to the same foods. Keeping a simple food diary can help identify personal triggers, but there is no single “ulcer diet” that works for everyone.
Habits that aggravate ulcers
- Smoking — one of the most significant aggravating factors; it increases acid secretion, reduces bicarbonate production in the duodenum, and impairs healing
- Heavy alcohol use — damages the mucosal barrier and slows tissue repair
- Taking NSAIDs regularly — the single most important modifiable habit if you have an NSAID-related ulcer
- Eating large meals late at night — increases acid exposure when the stomach should be relatively empty
- Skipping meals — can leave stomach acid without food to buffer it, though the evidence here is not strong for everyone
- High stress levels — stress does not cause ulcers, but it can increase pain perception and may affect healing
Does Stress Cause Ulcers?
No. Psychological stress does not cause peptic ulcers. This was a widely held belief until H. pylori was identified as the primary cause in the 1980s.
That said, stress is not irrelevant. Research indicates that stress can increase the perception of pain and may influence how quickly the stomach lining heals. People under chronic stress also tend to sleep poorly, eat irregularly, and drink more alcohol — all of which can aggravate symptoms.
Severe physiological stress — such as that from major surgery, burns, or critical illness — is a different matter. This type of stress can cause what are called stress ulcers, particularly in intensive care settings. That is a distinct clinical scenario from everyday psychological stress.
Can Certain Foods Help an Ulcer Heal?
No food has been shown in clinical trials to heal a peptic ulcer. Healing requires addressing the underlying cause — eradicating H. pylori with antibiotics or stopping NSAIDs.
That said, some foods may support the stomach lining or reduce symptoms:
- Fiber-rich foods — some studies suggest diets high in soluble fiber may be associated with lower risk of duodenal ulcers, though this is not proven as a treatment
- Probiotic-rich foods — some evidence indicates certain probiotics may help reduce H. pylori colonization when used alongside standard antibiotic therapy, but they are not a substitute for it
- Green tea — contains compounds that have shown some antibacterial activity against H. pylori in laboratory studies, but human evidence is limited
- Cranberries — some research suggests cranberry compounds may inhibit H. pylori adhesion to the stomach lining, but clinical results are mixed and not strong enough to recommend as treatment
- Broccoli sprouts — contain sulforaphane, which has shown some activity against H. pylori in preliminary research, but again, human evidence is not sufficient to recommend as a treatment
The evidence here is limited. No food or supplement should replace medical treatment for an ulcer.
How Do Doctors Treat Ulcers?
Treatment depends on the cause.
If H. pylori is present, standard treatment typically involves a combination of antibiotics and a proton pump inhibitor (PPI) for a set period. This is called eradication therapy. It is highly effective when taken as prescribed. Some regimens also include bismuth.
If NSAIDs are the cause, the first step is to stop them if possible. Doctors may prescribe a PPI to reduce acid and allow healing. If NSAIDs are medically necessary, a PPI may be prescribed alongside them to protect the stomach.
In all cases, lifestyle changes — stopping smoking, reducing alcohol, and avoiding personal trigger foods — can support healing and reduce symptoms. But they are not a substitute for medical treatment.
Some ulcers do not heal with standard treatment. These are called refractory ulcers. They may require further investigation, a change in medication, or treatment of another underlying condition.
When Should You See a Doctor?
See a doctor if you have symptoms that suggest an ulcer — burning stomach pain, bloating, belching, nausea, or a feeling of fullness — especially if the pain improves or worsens with eating.
Seek urgent medical care if you have:
- Vomiting blood or material that looks like coffee grounds
- Black, tarry stools
- Sudden, severe stomach pain
- Difficulty breathing
- Feeling faint or dizzy
These can be signs of bleeding or perforation, which are medical emergencies.
What Habits Help an Ulcer Heal?
Quitting smoking is the single most helpful habit change for ulcer healing. Smoking impairs the stomach’s ability to repair itself and increases the risk of recurrence.
Reducing or stopping alcohol helps too. Alcohol irritates the stomach lining and can slow healing.
If you take NSAIDs regularly, talk to your doctor about alternatives. Do not stop prescribed medications without medical guidance.
Eating smaller, more frequent meals may reduce symptoms for some people. Avoiding personal trigger foods — the ones you have identified through experience — can help you feel better day to day.
Managing stress through sleep, exercise, and relaxation techniques may reduce pain perception, even though stress does not cause ulcers.
Does Diet Alone Ever Cure an Ulcer?
No. Diet alone does not cure a peptic ulcer. If H. pylori is present, antibiotics are required to eliminate it. If NSAIDs are the cause, stopping them is essential. Food choices can help you feel better and may support healing, but they cannot replace medical treatment.
Be cautious of any product or program that claims to cure ulcers through diet alone. No clinical evidence supports that claim.
Frequently Asked Questions
What foods should I avoid if I have an ulcer?
There is no single list that applies to everyone, but common triggers include spicy foods, citrus, coffee, alcohol, and high-fat meals. Keeping a food diary can help you identify your own triggers.
Does stress cause ulcers?
No, psychological stress does not cause peptic ulcers — H. pylori infection and NSAID use are the main causes. Stress may worsen pain perception and slow healing, but it is not the root cause.
Can drinking milk help an ulcer?
Milk may briefly soothe ulcer pain by neutralizing stomach acid, but it also stimulates acid production, which can worsen symptoms later. It is not a treatment for ulcers.
How long does it take for an ulcer to heal?
With proper treatment, most peptic ulcers heal within a few weeks to a few months. Healing time depends on the cause, whether you smoke, and whether you continue taking NSAIDs.

