Skip to main content

Stomach ulcer

Gastric ulcer

Stomach ulcers are open sores that develop when the lining of the stomach has become damaged. Stomach ulcers are also called gastric ulcers.

What are stomach ulcers?

Continue reading below

What causes stomach ulcers?

Your stomach normally produces acid to help with the digestion of food and to kill germs (bacteria). This acid is corrosive, so some cells on the inside lining of the stomach and the first part of the gut (small intestine) known as the duodenum produce a natural mucous barrier. This protects the stomach lining and duodenum.

For more information about your digestive tract, see also The digestive system.

There is normally a balance between the amount of acid that you make and the mucous defence barrier. An ulcer may develop if there is an alteration in this balance, allowing the acid to damage the lining of the stomach or digestive tract (duodenum). Causes of this include the following:

Infection with H. pylori

Infection with the bacteria Helicobacter pylori (usually called H. pylori) is the cause in about 8 in 10 cases of stomach ulcer. See the separate leaflet called Helicobacter Pylori for more information.

Anti-inflammatory medicines - including aspirin

Anti-inflammatory medicines are sometimes called non-steroidal anti-inflammatory drugs (NSAIDs). Common examples include: ibuprofen, naproxen and aspirin. These drugs are more likely to cause a stomach ulcer if taken at high doses for a long time. Certain indigestion medications are sometimes used at the same time as an NSAID to prevent an ulcer, for example: omeprazole or lansoprazole

Other causes and factors

Smoking leads to a two-fold increase in the risk of getting a stomach ulcer.

Other causes are rare. For example, some viral infections can cause a stomach ulcer. Crohn's disease may cause a stomach ulcer in addition to other problems of the gut.

Stomach cancer may at first look similar to an ulcer. Stomach cancer is uncommon but may need to be 'ruled out' if you are found to have a stomach ulcer.

Very rarely, stomach ulcers can be caused by Zollinger-Ellison syndrome. In this condition, tumours (called gastrinomas) in the duodenum or pancreas cause your stomach to make too much acid, leading to severe and recurrent stomach ulcers that are often resistant to treatment.

How common are stomach ulcers?

It's not known exactly how common stomach ulcers are. They have become much less common since the 1980s because of much more effective treatments. So people with stomach ulcers now usually get better much more quickly.

The term 'peptic ulcer' is used to describe ulcers that are caused by too much acid in the digestive system. This includes stomach ulcers and also ulcers in the first part of the gut (small intestine) known as the duodenum. Stomach ulcers are less common than duodenal ulcers.

Continue reading below

What does a stomach ulcer feel like?

The main symptom of a stomach ulcer is having a pain in the upper tummy (abdomen).

Other common symptoms may include:

  • Bloating. This means your tummy swells because your stomach is full of gas or air.

  • Retching. Also known as 'heaving'. This means sounding and looking as though you're about to be sick (vomit) but not actually vomiting.

  • Feeling sick (nausea).

  • Vomiting.

  • Feeling very 'full' after a meal.

  • The acid in your stomach may also cause heartburn. The is caused by acid reflux.

Are stomach ulcers dangerous?

Stomach ulcers can cause various complications and side-effects but these are much less common now because of more effective treatments. However, complications can be very serious and include:

Bleeding ulcers

  • This can range from a 'trickle' to a life-threatening bleed.

  • If there is sudden heavy bleeding then this will cause you to vomit blood (this is called a haematemesis) and make you feel very faint.

  • Less sudden bleeding may cause you to vomit and the vomit looks dark brown because the stomach acid has partly broken down the blood. Doctors call this "coffee grounds" vomit because it looks like the dregs remaining after brewing coffee.

  • A more gradual trickle of blood will pass through your gut (bowel) and cause your stools (faeces) to look very dark in colour or even black (this is called melaena).

  • If you think you have symptoms of a bleeding ulcer you should see a doctor urgently.


This is the term used to describe the ulcer having made a hole all the way through (perforated) the wall of the stomach. Food and acid in the stomach then leak out of the stomach. This usually causes severe pain and makes you very unwell. Stomach perforation is a medical emergency and needs hospital treatment as soon as possible.

Stomach blockage

This is now rare. An ulcer at the end of the stomach can cause the outlet of the stomach (the part of the stomach that goes into the duodenum) to narrow and cause an obstruction. This can cause frequent severe vomiting.

Continue reading below

How to treat stomach ulcers

General advice

Lifestyle measures can improve symptoms, such as:

Acid-suppressing medication

A 4 to 8-week course of a medicine that's aim is to greatly reduce the amount of acid that your stomach makes is usually advised. The most commonly used medications to suppress acid are proton pump inhibitors and H2 blockers. These medicines are very commonly prescribed for stomach acid problems, including stomach ulcers. They are usually very well tolerated and side-effects are uncommon.

See the separate leaflet called Indigestion Medication for more information.

If your ulcer was caused by Helicobacter pylori (H. pylori)

Most stomach ulcers are caused by infection with H. pylori. Therefore, a main part of the treatment is to clear this infection. The treatment given is a combination of antibiotics and acid-suppressing medication. If the infection is not cleared, the ulcer is likely to return once you stop taking acid-suppressing medication. For more information, see the separate leaflet called Helicobacter Pylori.

If your ulcer was caused by an anti-inflammatory medicine

If possible, you should stop taking the anti-inflammatory medicine. This allows the ulcer to heal. You will also normally be prescribed an acid-suppressing medicine for several weeks.

This stops the stomach from making acid and allows the ulcer to heal. However, in many cases, the anti-inflammatory medicine is needed to ease symptoms of arthritis or other painful conditions, or aspirin is needed to protect against blood clots. In these situations, one option is to take an acid-suppressing medicine each day indefinitely. This reduces the amount of acid made by the stomach and greatly reduces the chance of an ulcer forming again.

What about surgery?

In the past, surgery was commonly needed to treat a stomach ulcer. This was before it was discovered that H. pylori infection was the cause of most stomach ulcers, and before modern acid-suppressing medicines became available. Surgery is now usually only needed if a complication of a stomach ulcer develops, such as severe bleeding or a hole (perforation).

What happens after stomach ulcer treatment?

A repeat gastroscopy (endoscopy) is usually advised 6-8 weeks after treatment has finished. This is mainly to check that the ulcer has healed. It is also to be doubly certain that the 'ulcer' was not due to stomach cancer. If your ulcer was caused by H. pylori then a test is advised to check that the H. pylori infection has gone. This is done at least four weeks after the course of combination therapy has finished.

How to diagnose stomach ulcers

The main tests that are used to diagnose a stomach ulcer are as follows:

A test to detect the H. pylori germ (bacterium)

This is usually done if you have a stomach ulcer. H. pylori bacteria can be detected in a sample of stool (faeces), or in a 'breath test', or from a blood test, or from a biopsy sample taken during a gastroscopy. See the separate leaflet called Helicobacter Pylori for more details.

Blood tests

Your doctor may want you to have some blood tests. These can check if you are anaemic because of any bleeding from the ulcer. They may also want to check that your liver, kidneys and pancreas are working properly.

Gastroscopy (endoscopy)

This is the test that can confirm a stomach ulcer. Gastroscopy is usually done as an outpatient 'day case'. You may be given a sedative to help you to relax. In this test, a doctor looks inside your stomach by passing a thin, flexible telescope down your gullet (oesophagus). The doctor will then be able to see any inflammation or ulcers in your stomach.

Small samples (biopsies)

Samples are usually taken of the tissue in and around the ulcer during gastroscopy. These are sent to the laboratory to be looked at under the microscope. This is important because some ulcers are caused by stomach cancer. However, most stomach ulcers are not caused by cancer and can be completely treated with medication.

Further reading and references

Article history

The information on this page is written and peer reviewed by qualified clinicians.

symptom checker

Feeling unwell?

Assess your symptoms online for free