Skip to main content

Causes - Stomach ulcer

Stomach ulcers are usually caused by an infection of Helicobacter pylori (H. pylori) bacteria, or from taking anti-inflammatory medicines (NSAIDs), such as ibuprofen and aspirin.

These can break down the stomach's defence against the acid it produces to digest food, allowing the stomach lining to become damaged and an ulcer to form.

H. pylori bacteria

It’s common to have a H. pylori infection, and it’s usually harmless for most people.

But sometimes it causes ulcers in the stomach (gastric ulcer) or in the duodenum (duodenal ulcer).

It's not clear exactly why some people are more affected than others.

Anti-inflammatory medicines (NSAIDs)

NSAIDs are medicines widely used to treat pain, a high temperature (fever) and inflammation (swelling).

Commonly used NSAIDs include:

Many people take NSAIDs without having any side effects. But there's always a risk the medication could cause problems, such as stomach ulcers, particularly if taken for a long time or at high doses.

You may be advised not to take NSAIDs if you currently have or have had a stomach ulcer. 

Paracetamol can often be used as an alternative painkiller.

Lifestyle factors

There's little evidence that some lifestyle factors, like spicy foods, stress and alcohol, cause stomach ulcers. But they may make your symptoms worse.

It's thought that smoking increases your risk of developing stomach ulcers and may make treatment less effective.

Page last reviewed: 14 January 2022
Next review due: 14 January 2025