About stomach ulcers

Stomach ulcers (gastric ulcers) are open sores that develop on the lining of the stomach. Ulcers can also occur in part of the intestine just beyond the stomach. These are called duodenal ulcers.

Stomach and duodenal ulcers are sometimes called peptic ulcers. This information applies to both.

Symptoms of stomach ulcers

Although the most common symptom of a stomach ulcer is a burning or gnawing pain in the centre of the abdomen (tummy). Not all stomach ulcers are painful.

Some people experience:

  • indigestion
  • heartburn
  • nausea (feeling sick)

You should speak to your GP if you think you have a stomach ulcer.

More about the symptoms of a stomach ulcer

Get urgent medical advice

Speak to your GP immediately (or phone the 111 service) if:

  • your symptoms persist
  • you're vomiting blood – the blood can appear bright red or have a dark brown, grainy appearance like coffee grounds
  • you're passing dark, sticky, tar-like stools
  • you feel a sudden, sharp pain in your tummy that gets steadily worse

These could be a sign of a serious complication.

What causes stomach ulcers?

Stomach ulcers occur when the layer protecting the stomach lining from stomach acid breaks down. This allows the stomach lining to become damaged.

This is usually caused by:

  • an infection with Helicobacter pylori (H. pylori) bacteria
  • taking non-steroidal anti-inflammatory drugs (NSAIDs), such as ibuprofen or aspirin – particularly if they're taken for a long time or at high doses

There's little evidence that stress or certain foods causes stomach ulcers.

More about the causes of stomach ulcers

Treating stomach ulcers

You'll be treated using antibiotics if your ulcer was caused by a H. pylori infection. This kills the bacteria and should prevent the ulcer coming back.

You'll be treated using a proton pump inhibitor (PPI) if your ulcer was caused by NSAIDs. Your doctor will prescribe these and discuss whether you should keep using NSAIDs. Alternative medication to NSAIDs, such as paracetamol, may be recommended.

Most stomach ulcers take a few months to heal after treatment. However, stomach ulcers can come back after treatment, although this is less likely to happen if the underlying cause is addressed.

More about treating stomach ulcers


Complications are rare but can be very serious and potentially life-threatening.

The main complications include:

  • bleeding at the site of the ulcer
  • the stomach lining at the site of the ulcer splits open – known as perforation
  • the ulcer blocks the movement of food through the digestive system – known as gastric obstruction

More about the complications of stomach ulcers

Stomach ulcer symptoms

The most common symptom of a stomach ulcer is a burning or gnawing pain that develops in your abdomen (tummy).

However, some stomach ulcers aren't painful and are only noticed when a complication develops, such as bleeding from the ulcer.

Tummy pain

The pain caused by a stomach ulcer can either travel:

  • out from the middle of your tummy up to your neck
  • down to your belly button
  • through to your back


  • can last from a few minutes to a few hours
  • often starts within a few hours of eating
  • can cause you to wake up during the night

Taking antacids (indigestion medication) may temporarily relieve the pain, but it will keep coming back if the ulcer isn't treated.

Less common symptoms

Less common symptoms of a stomach ulcer include:

Some people also find they burp or become bloated after eating fatty foods.

Stomach ulcer causes

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

These can break down the stomach's defence against the acid it produces to digest food. The stomach lining then becomes damaged causing an ulcer to form.

H. pylori bacteria

H. pylori bacteria live in the stomach lining. The bacteria can irritate the stomach lining and make it more vulnerable to damage from stomach acid.

Infections are common. It's possible to be infected without realising it because the infection doesn't usually cause symptoms.

People of all ages can be infected. It's not clear exactly why some people are more vulnerable to the effects of H. pylori bacteria than others.

Non-steroidal anti-inflammatory drugs (NSAIDs)

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

Commonly used NSAIDs include:

  • ibuprofen
  • aspirin
  • naproxen
  • diclofenac

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 use NSAIDs if you currently have a stomach ulcer or if you've had one in the past. Paracetamol is a safer painkiller to use.

More about NSAIDs

Lifestyle factors

There's little evidence that stomach ulcers are caused by:

  • spicy foods
  • stress
  • alcohol

But these can make the symptoms worse.

However, smoking can:

  • increase your risk of developing stomach ulcers
  • make treatment less effective

Stomach ulcer diagnosis

If your GP thinks you have an ulcer, they

  • will want to know if you're taking non-steroidal anti-inflammatory drugs (NSAIDs)
  • might test you for an Helicobacter pylori (H. pylori) infection

In some cases, you may be referred for a gastroscopy to look for an ulcer inside your stomach.

Testing for H. pylori infection

If your GP thinks your symptoms might be caused by an H. pylori infection, you'll be offered a:

  • urea breath test
  • stool antigen test – a small stool sample is tested for the bacteria
  • blood test

Urea breath test

You'll be given a special drink containing a chemical that's broken down by H. pylori. Your breath is then analysed to see whether or not you have an H. pylori infection.

Blood test

A sample of your blood's tested for antibodies to the H. pylori bacteria. Antibodies are proteins produced naturally in your blood to help fight infection.

This test's now largely been replaced by the stool antigen test

More about blood tests


A gastroscopy is a procedure that involves passing a thin, flexible tube (an endoscope) with a camera at one end into your mouth and down into your stomach and first section of the small intestine (duodenum).

You may:

  • be given a mild sedative injection before the procedure
  • have your throat sprayed with a local anaesthetic to make it more comfortable to pass the endoscope

The images taken by the camera will usually confirm or rule out an ulcer. A small tissue sample may also be taken from your stomach or duodenum to test for the H. pylori bacteria.

You'll have this procedure as an outpatient in hospital. This means you won't have to spend the night.

You may have a repeat gastroscopy after 4 to 6 weeks to check that the ulcer's healed.

Stomach ulcer treatment

If you have a stomach ulcer, your treatment will depend on what caused it.

With treatment, most ulcers heal in a month or two.

Treating Helicobacter pylori (H. pylori) infection

If your stomach ulcer's caused by a Helicobacter pylori (H. pylori) bacterial infection, you'll be given:

  • a course of antibiotics
  • a medication called a proton pump inhibitor (PPI)

This is also recommended if it's thought your stomach ulcer's caused by a combination of an H. pylori infection and non-steroidal anti-inflammatory drugs (NSAIDs).


If you have an H. pylori infection, you'll usually be prescribed a course of 2 or 3 antibiotics.

The most commonly used antibiotics are:

  • amoxicillin
  • clarithromycin
  • metronidazole

You should take these twice a day for a week.

Side effects

The side effects of these are usually mild, but can include:

  • feeling and being sick
  • diarrhoea
  • a metallic taste in your mouth

Further testing

You'll be re-tested at least 4 weeks after finishing your antibiotic course to see if there are any H. pylori bacteria left in your stomach. If there are, a further course of eradication therapy using different antibiotics may be given.

Ulcers caused by NSAIDs

If your stomach ulcer's caused by taking NSAIDs:

  • you'll be given a course of PPI medication
  • your use of NSAIDs will be reviewed, and you may be advised to use an alternative painkiller

Alternative painkillers

You may be advised to use an alternative painkiller not associated with stomach ulcers, such as paracetamol.

COX-2 inhibitors are sometimes recommended. These are an alternative type of NSAID that's less likely to cause stomach ulcers.

Low-dose aspirin

If you're taking low-dose aspirin to reduce your risk of blood clots, your GP will tell you whether you need to keep taking it.

If you do, you may also be prescribed long-term treatment with a PPI or H2-receptor antagonist to prevent further ulcers.


It's important to understand the potential risks associated with continued NSAID use.

You're more likely to develop another stomach ulcer and could experience a serious complication, such as internal bleeding.

Read more about the complications of stomach ulcers

Proton pump inhibitors (PPIs)

PPIs work by reducing the amount of acid your stomach produces. This prevents further damage to the ulcer as it heals naturally.

The most commonly used PPIs are:

  • omeprazole
  • pantoprazole
  • lansoprazole

They're usually prescribed for 4 to 8 weeks.

Side effects

Side effects of these are usually mild, but can include:

These should pass once treatment has been completed.

H2-receptor antagonists

Sometimes a type of medication called H2-receptor antagonists are used instead of PPIs.

These also reduce the amount of acid your stomach produces.

Ranitidine is the most widely used H2-receptor antagonist for treating stomach ulcers.

Side effects

Side effects are uncommon, but can include:

  • diarrhoea
  • headaches
  • dizziness
  • rashes
  • tiredness

Antacids and alginates

As these treatments can take several hours before they start to work, your GP may recommend taking additional antacid medication.


  • neutralise your stomach acid
  • provide immediate, but short-term, symptom relief
  • should be taken when you experience symptoms or when you expect them, such as after meals or at bedtime

Some antacids also contain a medicine called an alginate, which produces a protective coating on the lining of your stomach. Antacids containing alginates are best taken after meals.

You can buy these medications at pharmacies. Your pharmacist can tell you which is most suitable for you.

Side effects

Side effects of both medications are usually mild, but can include:

Lifestyle changes

There aren't any special lifestyle measures you need to take during treatment.

However, avoiding stress, alcohol, spicy foods and smoking may reduce your symptoms while your ulcer heals.

Stomach ulcer complications

Complications of stomach ulcers are rare, but can be very serious.

The main complications are:

  • internal bleeding
  • perforation - the lining of the stomach splits open
  • gastric outlet obstruction - the stomach ulcer obstructs the normal passage of food through your digestive system

Internal bleeding

Internal bleeding's the most common complication of stomach ulcers. It can occur when an ulcer develops at the site of a blood vessel.

The bleeding can either be slow and long-term, or rapid and severe.

Slow, long-term bleeding

Slow, long-term bleeding can lead to anaemia.

Symptoms of anaemia include:

You should visit your GP if you have persistent symptoms of anaemia. If they think you have a stomach ulcer, they may refer you to a gastroenterologist for an examination and treatment.

More about anaemia

Severe bleeding

Contact your GP or the NHS 24 111 service immediately if you have symptoms of more severe bleeding, including:

  • you're vomiting blood – the blood can appear bright red or have a dark brown, grainy appearance like coffee grounds
  • you're passing dark, sticky, tar-like stools

Stopping severe bleeding

An endoscopy will be used to identify the cause of the bleeding. Treatment can be given during the endoscopy to stop the bleeding.


  • specialised procedures carried out under X-ray guidance are used to stop bleeding ulcers
  • surgery is needed to repair the affected blood vessel

Blood transfusions may also be needed to replace the blood you've lost.


Perforations are a rarer complication of stomach ulcers. This is when the lining of the stomach splits open.

This can be very serious because it lets the bacteria that live in your stomach escape and infect the lining of your abdomen (peritoneum). This is known as peritonitis.


In peritonitis, an infection can rapidly spread into the blood (sepsis) before spreading to other organs. This carries the risk of multiple organ failure and can be fatal if left untreated.

The most common symptom of peritonitis is sudden abdominal pain, which gets steadily worse. If you have this type of pain, contact your GP or the NHS 24 111 service immediately

Peritonitis is a medical emergency that requires hospital admission. In some cases, surgery may be needed.

Gastric outlet obstruction

In some cases, an inflamed (swollen) or scarred stomach ulcer can obstruct the normal passage of food through your digestive system. This is called a gastric outlet obstruction.

Symptoms include:

  • vomiting large amounts of undigested food
  • a constant feeling of bloating or fullness
  • feeling more full than usual after eating less food
  • unexplained weight loss

Treating a gastric outlet obstruction

An endoscopy can be used to confirm the obstruction.

If the obstruction's caused by inflammation, proton pump inhibitors (PPIs) or H2-receptor antagonists can be used to reduce stomach acid levels until the swelling goes down.

If the obstruction's caused by scar tissue, surgery may be needed. This can involve passing a small balloon through an endoscope and inflating it to widen the site of the obstruction.

Last updated:
29 May 2023