Stomach and upper digestive tract
Gastric ulcer (stomach ulcer): symptoms, causes and treatment
A gastric ulcer is an open sore in the lining of the stomach. Most are caused by Helicobacter pylori infection or by anti-inflammatory painkillers, and most heal with treatment. This guide covers the symptoms, how a GP investigates them, what treatment involves and which signs mean you need help urgently.
Last checked: 2026-10-10
Key facts
At a glance.
-
What it is
NHS inform describes a gastric ulcer as an open sore on the lining of the stomach. Ulcers just beyond the stomach, in the first part of the small intestine, are called duodenal ulcers, and the two together are often called peptic ulcers.
-
Two main causes
The NHS names infection with Helicobacter pylori bacteria and regular use of anti-inflammatory painkillers such as ibuprofen as the main causes. Smoking and older age raise the risk further.
-
Main symptom
The NHS says the main symptom is tummy pain, usually in the upper abdomen, that may feel like burning and is often worse at night. NHS inform notes that not every ulcer is painful.
-
Treatment works
NHS inform says most ulcers heal within a month or two once the cause is treated. The NHS says treatment usually lasts from 1 week to 2 months, depending on the cause.
-
Can be serious
Untreated ulcers can bleed, split open (perforate) or block the movement of food. The NHS says these complications can be life-threatening, so black stools or vomiting blood needs 999.
-
Check the cure
If H. pylori was the cause, NHS inform says you should be re-tested at least 4 weeks after finishing antibiotics to confirm the bacteria have gone.
What a gastric ulcer is and how it forms
The stomach makes acid to digest food, and protects itself with a layer of mucus. NHS inform explains that an ulcer develops when that protective layer breaks down, allowing the lining underneath to be damaged by acid. The result is a raw patch, a little like a sore inside the mouth but in a place where acid is constantly present.
Doctors group ulcers of the stomach and of the duodenum, the first section of the small intestine, as peptic ulcers, and most of the information on this page applies to both. Ulcers of the stomach are the ones normally described as gastric ulcers, and the gastroscopy used to diagnose them can include a small tissue sample taken from the stomach or duodenum.
Gastric ulcers are not the same thing as functional dyspepsia, where there is indigestion but no ulcer or other visible cause. Guts UK points out that people can have H. pylori and indigestion for unrelated reasons, which is part of why testing and sometimes endoscopy are used rather than guessing.
Symptoms and warning signs
According to the NHS, the pain of a stomach ulcer is usually in the upper part of the tummy, may feel like burning and is often worse at night. NHS inform adds that it can spread towards the neck, the belly button or through to the back, often starts within a few hours of eating, may last from minutes to hours and can wake you from sleep. Antacids may ease it for a while, but it tends to return if the ulcer is not treated.
Other symptoms include indigestion, heartburn, bloating and feeling or being sick. NHS inform lists loss of appetite and weight loss as less common features, and says some people burp or feel bloated after fatty food. Some ulcers cause no pain at all and are discovered only when a complication such as bleeding occurs.
-
Ask for an urgent GP appointment or call NHS 111 if pain is getting worse or not going away, if you have lost your appetite, feel full after very little food, are losing weight without trying, have a lump in your tummy, find swallowing painful or difficult, keep vomiting or feel tired all the time.
-
Call 999 or go to A&E if you vomit bright red blood or something that looks like ground coffee, your poo is black, sticky and very smelly or has blood in it, you have severe tummy pain or a tummy that hurts to touch, or you have sudden chest pain.
Causes and risk factors
Helicobacter pylori lives in the stomach lining and can make it more vulnerable to damage from acid. Guts UK says up to 2 in 5 people in the UK carry it and that 8 to 9 out of 10 never have a problem, with about 3 in 20 of those infected developing an ulcer. It is thought to spread mainly within families in childhood.
Non-steroidal anti-inflammatory drugs (NSAIDs), such as ibuprofen, naproxen, diclofenac and aspirin, are the other main cause, particularly when taken for a long time or at high doses. Many people take them without trouble, but the risk is always there. A smaller number of ulcers have no identifiable cause.
NHS inform says there is little evidence that spicy food, stress or alcohol cause ulcers, although they can make symptoms worse. Smoking, by contrast, increases the chance of developing an ulcer and makes treatment less effective.
How gastric ulcers are diagnosed
A GP will ask about your symptoms and about any anti-inflammatory painkillers, including over-the-counter ones, and may weigh you and feel your tummy. The NHS says tests can include a breath test, a stool sample or a blood test to look for H. pylori. NHS inform notes that the blood test has largely been replaced by the stool antigen test.
Guts UK explains that tests for H. pylori can be inaccurate if you have taken antibiotics in the previous month or a proton pump inhibitor (acid-lowering medicine) in the last 2 weeks, so tell the person arranging the test what you have taken. NICE Clinical Knowledge Summaries make the same point about breath and stool tests.
You may be referred for a gastroscopy, where a thin camera is passed through the mouth into the stomach. This can confirm or rule out an ulcer and allows a small tissue sample to be taken. NHS inform says a repeat gastroscopy after 4 to 6 weeks may be used to check that the ulcer has healed.
Treatment and healing
Treatment depends on the cause. If H. pylori is responsible, NHS inform says you will be given a course of two or three antibiotics, most commonly amoxicillin, clarithromycin or metronidazole, taken twice a day for a week, together with a proton pump inhibitor. Side effects are usually mild, such as feeling or being sick, diarrhoea or a metallic taste. Guts UK stresses that finishing the full course exactly as prescribed makes treatment more likely to succeed, and that people taking metronidazole should avoid alcohol.
If an NSAID is the cause, you will be given a proton pump inhibitor and your use of anti-inflammatory painkillers will be reviewed. Paracetamol may be suggested as an alternative, and NHS inform says COX-2 inhibitors, a different type of NSAID that is less likely to cause ulcers, are sometimes recommended. Do not stop any prescribed medicine, such as low-dose aspirin for blood clots, without asking your doctor.
The NHS adds that a doctor may advise stopping smoking, changing medicines that make symptoms worse and getting help with stress, anxiety and depression. If symptoms come back after treatment you should speak to a GP, as you may need a different medicine or a longer course.
| Cause | Main treatment | Follow-up |
|---|---|---|
| H. pylori infection | Antibiotics plus a proton pump inhibitor | Re-test at least 4 weeks after finishing; different antibiotics if bacteria remain |
| NSAID use | Proton pump inhibitor and review of the painkiller | Alternative pain relief discussed; ulcer may be re-checked |
| Both together | Antibiotics and proton pump inhibitor | NSAID use reviewed |
| No cause found | Acid-lowering medicine and lifestyle advice | Review if symptoms continue |
What you can do day to day
The NHS suggests eating smaller meals, finishing your evening meal 3 to 4 hours before bed, keeping to a healthy weight and finding ways to manage stress. It advises not taking anti-inflammatory painkillers without speaking to a doctor, avoiding foods and drinks that trigger your symptoms, which for some people include fatty or spicy food, coffee and chocolate, not smoking and not drinking too much alcohol.
These steps do not replace treatment of the underlying cause but may help symptoms settle and reduce the chance of a recurrence.
Outlook and complications
With the right treatment most ulcers heal and, once the cause is dealt with, are unlikely to return. Guts UK explains that before H. pylori was understood, ulcers healed with acid-reducing medicines but came back when treatment stopped, whereas clearing the bacteria greatly reduces the risk of recurrence.
Complications are uncommon but important. NHS inform names bleeding at the site of the ulcer, perforation where the stomach wall splits and obstruction of food passing through the digestive system. The NHS also lists iron deficiency anaemia from slow bleeding and, from untreated H. pylori, an increased risk of stomach cancer. This is why seeking review when pain is persistent matters.
Using the NHS or seeing a private gastroenterologist
Most stomach ulcers are diagnosed and treated through the GP, using a H. pylori breath or stool test and a course of tablets, with a gastroscopy arranged by a hospital team when it is needed. That route is free and usually sufficient.
People who have repeated symptoms, a bleed, or who want a faster endoscopy sometimes see a private gastroenterologist. The tests and medicines involved are the same, so the difference is mainly timing and appointment choice rather than a different kind of treatment. Whichever route you use, it is worth asking for the result of the H. pylori test and, if you were treated, when and how clearance will be checked.
Frequently asked
Questions people ask.
Quick, plain-English answers to the questions we hear most.
-
What is the difference between a gastric ulcer and a duodenal ulcer?
A gastric ulcer is in the stomach lining, while a duodenal ulcer is in the first part of the small intestine just beyond it. NHS inform says both are sometimes called peptic ulcers and the same information applies to both.
-
Can stress cause a stomach ulcer?
NHS inform says there is little evidence that stress, spicy food or alcohol cause ulcers, although they can make symptoms worse. The NHS also notes that stress, anxiety and depression can aggravate symptoms, so support with these is part of care.
-
Why does the pain wake me at night?
The NHS says the pain is often worse at night, and NHS inform lists waking from sleep as common. Taking an antacid may ease it for a time, but NHS inform says the pain keeps coming back if the ulcer is not treated.
-
Will I need an endoscopy?
Not always. The NHS says you may be referred for a gastroscopy, and NHS inform says it is used when the picture is unclear, when there are warning signs, or to check a stomach ulcer has healed.
-
How long does treatment take?
The NHS says treatment usually lasts from 1 week to 2 months, depending on the cause. NHS inform says most ulcers heal in a month or two, and that some take a few months.
-
Can I still take ibuprofen?
The NHS says not to take anti-inflammatory painkillers such as ibuprofen without speaking to a doctor first. NHS inform says paracetamol is considered safer for the stomach and may be suggested instead.
-
Why do I need a second test after antibiotics?
NHS inform says you will be re-tested at least 4 weeks after finishing antibiotics to see whether any H. pylori remain. If they do, a further course with different antibiotics may be given.
-
Can a stomach ulcer turn into cancer?
The sources used here do not describe an ulcer turning into cancer, but the NHS lists an increased risk of stomach cancer from untreated H. pylori infection. Persistent or changing symptoms, weight loss or difficulty swallowing should be reported to a GP so they can be investigated.
-
Do I need to avoid particular foods?
The NHS advises avoiding foods and drinks that trigger your own symptoms, which can include fatty or spicy food, coffee and chocolate. There is no single ulcer diet, and smaller meals and an earlier evening meal are the main suggestions.
-
When is a stomach ulcer an emergency?
The NHS says to call 999 or go to A&E if you vomit bright red blood or coffee-ground material, pass black sticky stools or blood, have severe tummy pain or a tender abdomen, or have sudden chest pain.
Where this comes from
Sources and checking.
This guide is for information, not medical advice.
Your GP or consultant knows your history and can tell you which parts apply to you. If your symptoms are severe, rapidly worsening, or come with red-flag features, seek urgent medical care. Figures and availability change, so treat them as a guide and confirm with the provider.
Published 2026-10-10, next review 2027-10-10.
-
NHS: Stomach ulcer, https://www.nhs.uk/conditions/stomach-ulcer/ , retrieved October 2026
-
NHS inform: Stomach ulcer (gastric ulcer), https://www.nhsinform.scot/illnesses-and-conditions/stomach-liver-and-gastrointestinal-tract/stomach-ulcer/ , retrieved October 2026
-
Guts UK: Helicobacter pylori, https://gutscharity.org.uk/advice-and-information/conditions/helicobacter-pylori/ , retrieved October 2026
-
NICE Clinical Knowledge Summaries: Dyspepsia - unidentified cause, https://cks.nice.org.uk/topics/dyspepsia-unidentified-cause/ , retrieved October 2026
Related guides
Keep reading.
-
Helicobacter pylori
The bacterium behind many stomach and duodenal ulcers.
Read guide -
Peptic ulcer
The wider group of ulcers of the stomach and duodenum.
Read guide -
Functional dyspepsia
Indigestion without an ulcer or other visible cause.
Read guide -
Gastroscopy
The camera test used to look at the stomach lining.
Read guide -
Helicobacter pylori breath test
How the urea breath test checks for the bacterium.
Read guide -
Gastroenterology
The specialty that looks after the digestive system.
Read guide