Stomach ulcer
Gastric ulcer
Peer reviewed by Dr Rosalyn Adleman, MRCGPLast updated by Dr Philippa Vincent, MRCGPLast updated 16 Sept 2024
Meets Patient’s editorial guidelines
- DownloadDownload
- Share
- Language
- Discussion
- Audio Version
- Add to preferred sources on Google
Stomach ulcers (also called gastric ulcers) are breaks in the lining of the stomach that develop due to damage. They can cause a burning or gnawing pain in the top and middle of the abdomen. Treatments include acid-suppressing medication and avoiding trigger foods.
At a glance
A stomach ulcer is a sore in the lining of the stomach.
The main symptom is upper tummy pain, and it can also cause bloating, nausea, or vomiting.
Most stomach ulcers are caused by an H. pylori bacterial infection or anti-inflammatory medicines.
Diagnosis usually involves a gastroscopy to look inside your stomach and take samples.
Treatment includes medicines to reduce stomach acid, and antibiotics if H. pylori is found.
Seek urgent medical advice for symptoms like vomiting blood or black, sticky stools.
In this article:
Video picks for Abdominal pain
What are stomach ulcers?
Continue reading below
What is a stomach ulcer?
A stomach ulcer is a sore or shallow hole in the lining of the stomach.
Stomach ulcer symptoms
Back to contentsThe main symptom of a stomach ulcer is having upper abdominal pain.
Other common symptoms may include:
Bloating. This is swelling of the abdomen because the stomach is full of gas.
Retching. Also known as 'heaving'. This means appearing about to be sick (vomit) but not actually vomiting.
Feeling sick (nausea).
Vomiting.
Feeling very 'full' after a meal.
The stomach acid often also causes heartburn. The is caused by acid reflux.
Continue reading below
Stomach ulcer causes
Back to contentsThe stomach contains high levels of acid which helps to break down foods. A stomach ulcer occurs when there is damage to the layer that protects the stomach lining from these acids in the stomach. This damage is usually initially an area of redness and inflammation (gastritis). Over time, this inflammation can erode further and a stomach ulcer develops. Causes of this damage include:
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
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.
Some viral infections.
Zollinger-Ellison syndrome.
Stomach cancer may at first look similar to an ulcer. Stomach cancer is uncommon but people with stomach ulcers will usually have a sample taken (a biopsy) to ensure that there is no cancer present.
How common are stomach ulcers?
Back to contentsStomach ulcers occur in between 1 in 10 and 1 in 20 people over a lifetime. They have become much less common since the 1980s because of much more effective treatments. Stomach ulcers are less common than duodenal ulcers.
Continue reading below
Complications of stomach ulcers
Back to contentsStomach 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 small amount of blood to a life-threatening bleed.
If there is sudden heavy bleeding then this often causes vomiting of blood (this is called a haematemesis) and may make people feel faint.
Less sudden bleeding may cause you vomiting where 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 the gut (bowel) and cause the stools (faeces) to look black and sticky (this is called melaena).
Urgent medical advice should be sought for symptoms of a bleeding stomach ulcer.
Perforation
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 into the abdominal cavity. This usually causes severe pain and makes people very unwell.
Stomach ulcer perforation is a medical emergency and needs hospital treatment as soon as possible.
Stomach blockage
This is a very rare complication. 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.
Stomach ulcer diagnosis
Back to contentsThe main tests that are used to diagnose a stomach ulcer are as follows:
A test to detect the H. pylori bacteria
H. pylori bacteria can be detected in a sample of stool (faeces) or from a biopsy sample taken during a gastroscopy.
Blood tests
Blood tests can look for anaemia because of any bleeding from the ulcer. They may also check that the liver, kidneys and pancreas are working properly.
Gastroscopy (endoscopy)
A gastroscopy is the definitive test for a stomach ulcer. During a gastroscopy a clinician looks inside the stomach by passing a thin, flexible telescope down the oesophagus. They will then be able to see any inflammation or ulcers in the stomach.
Biopsies
Samples (biopsies) 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. Most stomach ulcers are not caused by cancer and can be completely treated with medication.
Stomach ulcer treatment
Back to contentsAcid-suppressing medication
It is usual to be prescribed a 6-8 week course of a medicine designed to reduce the amount of acid produced by the stomach. The most commonly used medications to suppress acid are proton pump inhibitors and H2 blockers. They are usually very well tolerated and side-effects are uncommon.
See the separate leaflet called Indigestion medicine for more information.
Antibiotics
Most stomach ulcers are caused by infection with H. pylori. If this is confirmed by tests then 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 the acid-suppressing medication is stopped.
Stopping anti-inflammatory medicine
Anti-inflammatory medicines should be stopped if a stomach ulcer is diagnosed (or if symptoms of stomach inflammation - gastritis - develop. Gastritis often occurs before an ulcer develops). This will allow the ulcer to heal although acid-suppressing medication will also be needed at the same time.
As far as possible, anti-inflammatory medication should be avoided following a stomach ulcer. However, they can be important in managing arthritis symptoms. Aspirin (a type of anti-inflammatory medication) is often essential to protect against heart disease. In these situations, it is usual nowadays to prescribe an acid-suppressing medication daily alongside the anti-inflammatory medication in people over the age of 40.
Surgery
Surgery is usually only needed if a complication of a stomach ulcer develops, such as severe bleeding or a perforation.
General advice
Lifestyle measures can reduce the risks of inflammation and therefore a stomach ulcer developing. These include:
Avoiding any trigger foods that cause acid reflux, such as coffee, chocolate, tomatoes, fatty foods or spicy foods (these vary from person to person and not everyone has trigger foods).
Eating smaller meals and eating the evening meal 3-4 hours before going to bed.
What happens after stomach ulcer treatment?
Back to contentsA repeat gastroscopy (endoscopy) is usually advised 6-8 weeks after treatment has finished. This is to ensure that the ulcer has healed. It is also to be doubly certain that the stomach ulcer was not due to stomach cancer.
Patient picks for Abdominal pain

Digestive health
Spleen pain
This leaflet gives a brief overview of the spleen and its functions.
by Dr Colin Tidy, MRCGP

Digestive health
Right lower quadrant pain
Right lower quadrant (RLQ) pain is abdominal pain that is mainly in the lower half on the right-hand side. There are many causes of RLQ pain.
by Dr Hayley Willacy, FRCGP
Frequently asked questions
What is the difference between a stomach ulcer and gastritis?
Gastritis is an area of redness and inflammation in the stomach lining. If this inflammation erodes further over time, it can lead to the development of a stomach ulcer, which is a sore or shallow hole in the lining.
Are stomach ulcers a common condition in the UK?
Stomach ulcers occur in about 1 in 10 to 1 in 20 people over their lifetime. However, they have become much less common since the 1980s due to more effective treatments.
Can certain foods cause a stomach ulcer?
While certain foods don't directly cause a stomach ulcer, some can trigger acid reflux, which is linked to stomach problems. These trigger foods, such as coffee, chocolate, tomatoes, fatty foods, or spicy foods, vary from person to person. Eating smaller meals and finishing your evening meal 3-4 hours before bed can also help reduce inflammation risks.
Are there any warning signs that an ulcer is becoming serious?
Yes, serious complications like bleeding are possible. Warning signs include vomiting blood (which might look like 'coffee grounds' if less sudden), feeling faint, or passing black and sticky stools (melaena). A perforated ulcer can cause severe pain and make you very unwell. If you experience these symptoms, urgent medical advice is needed.
Why is a repeat gastroscopy needed after treatment for a stomach ulcer?
A repeat gastroscopy is usually recommended 6-8 weeks after treatment to ensure the ulcer has completely healed. It also serves as an important check to confirm that the ulcer was not caused by stomach cancer.
Further reading and references
- Gastro-oesophageal reflux disease and dyspepsia in adults: investigation and management; NICE Clinical Guideline (Sept 2014 - last updated October 2019)
- Acute upper gastrointestinal bleeding in over 16s: management; NICE Clinical Guideline (August 2016)
- Drini M; Peptic ulcer disease and non-steroidal anti-inflammatory drugs. Aust Prescr. 2017 Jun;40(3):91-93. doi: 10.18773/austprescr.2017.037. Epub 2017 Jun 1.
- Dyspepsia - proven peptic ulcer; NICE CKS, May 2024 (UK access only)
- Malik TF, Gnanapandithan K, Singh K; Peptic Ulcer Disease.
Continue reading below
About the authorView full bio

Dr Philippa Vincent, MRCGP
General Practitioner, Medical Author
MB BS, Bsc, MRCGP (2000), DCH, DFSRH, DRCOG
Dr Philippa Vincent is an NHS GP working in North London.
About the reviewerView full bio

Dr Rosalyn Adleman, MRCGP
MRCGP
Dr Rosalyn Adleman, is an NHS GP working in north London.
Article history
The information on this page is written and peer reviewed by qualified clinicians.
Next review due: 15 Sept 2027
16 Sept 2024 | Latest version

Ask, share, connect.
Browse discussions, ask questions, and share experiences across hundreds of health topics.

Feeling unwell?
Assess your symptoms online for free
Sign up to the Patient newsletter
Your weekly dose of clear, trustworthy health advice - written to help you feel informed, confident and in control.
By subscribing you accept our Privacy Policy. You can unsubscribe at any time. We never sell your data.