Causes of stomach ulcers 

Stomach ulcers are usually caused by either H. pylori bacteria or non-steroidal anti-inflammatory drugs (NSAIDs).

Acid and mucus

The stomach produces acid to digest food.

The lining of the stomach is coated with mucus, which protects the lining from harmful effects of the acid.

H. pylori bacteria and anti-inflammatory drugs (NSAIDs) can break down the stomach's defence against acid, allowing the acid to cause an ulcer. Even though most people with ulcers are not producing too much acid, blocking the acid will allow the ulcer to heal and then the cause of the ulcer can be removed to prevent it coming back.

H. pylori

Helicobacter pylori (H. pylori) infections are very common, and it's possible to be infected without realising it because the infection doesn't usually cause symptoms.

It's not known why some people are vulnerable to the effects of H. pylori when the majority of people are not. However, smoking seems to increase the risk.

Also, stomach ulcers are known to run in families, so genetics may make certain people more sensitive to H. pylori. Some strains of H.pylori are more damaging than others.


Non-steroidal anti-inflammatory drugs (NSAIDs) are medicines commonly used to treat:

Some people with cardiovascular disease (conditions that affect the heart and the blood) also take aspirin on a regular basis because it can reduce the risk of blood clots which can cause heart attacks and strokes.

NSAIDs  available over the counter include:

  • ibuprofen
  • aspirin
  • naproxen

NSAIDs only available on prescription include:

  • diclofenac
  • etodolac
  • fenoprofen

Read more about non-steroidal anti-inflammatory drugs.

Because of the risk of getting stomach ulcers, you may be advised not to use NSAIDs if you currently have a stomach ulcer or if you have had one in the past. 

Paracetamol can often be used as an alternative painkiller as it is safer.

However, there may be cases where the benefits of taking NSAIDs is thought to outweigh the risk of developing stomach ulcers. For example, if you have recently had a heart attack, low-dose aspirin may be required to prevent you having another one.

In such circumstances, a medication called a proton pump inhibitor (PPI) can be used to reduce the amount of acid in your digestive system, which should help prevent ulcers from forming and reduce the risk of complications.

Read more about treating stomach ulcers with PPIs.


Media last reviewed:

Next review due:

Lifestyle factors

In the past it was thought that stomach ulcers were caused by certain lifestyle factors, such as spicy foods, stress, smoking and alcohol. However, there is little hard evidence to confirm that this is the case.

It may be that although these types of lifestyle factors do not cause ulcers, they may make the symptoms of ulcers worse.

Does H pylori cause cancer?

H pylori is associated with a very slightly increased risk of stomach cancer. However, treating H pylori for this reason alone is not recommended. The risk of anyone getting stomach cancer is small and no one knows whether treating H pylori will actually reduce your risk of developing stomach cancer.

Page last reviewed: 19/07/2013

Next review due: 19/07/2015