Health Library › Conditions › Gastric ulcer
Condition
A gastric ulcer is an open sore in the lining of the stomach.
A gastric ulcer is an open sore in the lining of the stomach. It is one type of peptic ulcer. The other main type, a duodenal ulcer, develops in the first part of the small intestine.
The stomach normally has a protective lining that shields it from digestive acid. An ulcer forms when this protection is damaged and acid reaches the tissue underneath.
Most gastric ulcers are linked to infection with Helicobacter pylori, often called H. pylori, or to non-steroidal anti-inflammatory drugs (NSAIDs). These include ibuprofen, naproxen, and aspirin. Other causes are less common.
A gastric ulcer is treatable, and many heal once the cause is addressed. Treatment matters because an untreated ulcer can bleed, create a hole in the stomach, or block food from leaving the stomach. A stomach cancer can also sometimes look like an ulcer, so gastric ulcers are usually examined directly and biopsied.
The most common symptom is discomfort or burning pain in the upper abdomen, between the breastbone and belly button. The pain may come and go. Eating may make it better or worse, so the pattern alone cannot confirm an ulcer.
Other possible symptoms include:
Some ulcers cause few or no symptoms until they bleed. Slow blood loss may cause anaemia, meaning there are too few healthy red blood cells. This can lead to tiredness, weakness, breathlessness, or pale skin.
Vomiting blood, passing black and sticky stools, fainting, or developing sudden severe abdominal pain can signal a complication and needs emergency care.
Two causes account for most gastric ulcers.
H. pylori is a bacterium that can live in the stomach lining. It causes inflammation and weakens the lining’s protection from acid. Many people acquire it without knowing because it may cause no symptoms for years. Not everyone with the infection develops an ulcer.
NSAIDs like ibuprofen or naproxen reduce substances that protect the stomach lining. Ulcer risk is higher with longer use, higher doses, or more than one NSAID. Risk also rises in people with a previous ulcer and in those taking certain medicines, including blood thinners, corticosteroids like prednisone or hydrocortisone, or some antidepressants like sertraline or fluoxetine.
Low-dose aspirin is also an NSAID, even when it is prescribed to prevent a heart attack or stroke. Do not stop prescribed aspirin on your own. The risks of stopping may be greater than the risk from the ulcer, and a clinician can help balance them.
Smoking increases the chance that an ulcer will develop or return and can slow healing. Heavy alcohol use can irritate the stomach and may worsen symptoms or bleeding risk, but alcohol is not the usual underlying cause.
Physical or emotional stress does not usually cause a gastric ulcer by itself. Severe physical stress from critical illness, major injury, or extensive burns can occasionally cause ulcers in people who are very unwell.
Rare causes include conditions that make the stomach produce unusually large amounts of acid, certain infections in people with weakened immune systems, and stomach cancer.
Symptoms cannot reliably distinguish an ulcer from acid reflux, inflammation of the stomach, gallbladder problems, or other causes of upper abdominal pain.
The main test for a suspected gastric ulcer is an upper gastrointestinal endoscopy. A clinician passes a thin, flexible tube with a camera through the mouth and into the stomach. Sedation or throat-numbing medicine may be offered. The test shows the ulcer’s size and location and whether it is bleeding.
Small tissue samples, called biopsies, are usually taken from a gastric ulcer. Examining these samples helps rule out cancer because a malignant growth can sometimes resemble a non-cancerous ulcer.
Testing for H. pylori may be done using:
Blood antibody tests cannot reliably show whether an infection is currently active or whether treatment has cleared it. Acid-suppressing medicines, antibiotics, and bismuth can also affect some test results, so you may receive instructions about temporarily pausing them before testing. Do not stop prescribed medicine without guidance.
Blood tests may be used to look for anaemia or signs of significant bleeding. Depending on the ulcer’s appearance, biopsy findings, symptoms, and cause, another endoscopy may be arranged to confirm that it has healed.
Treatment aims to heal the stomach lining, remove the cause, and prevent bleeding or recurrence.
A proton pump inhibitor, or PPI, is commonly used to reduce stomach acid while the ulcer heals. The length of treatment is based on factors such as the ulcer’s size, its cause, and whether an NSAID must continue.
If H. pylori is present, treatment uses an acid-suppressing medicine with a combination of antibiotics. Some regimens also contain bismuth, which helps protect the stomach lining. The exact combination is chosen according to local antibiotic resistance, medicine allergies, and previous antibiotic use.
It is important to complete the prescribed course. A breath or stool test is generally used later to confirm that the infection has cleared. Symptoms improving does not prove that H. pylori has gone.
If an NSAID contributed to the ulcer, it may need to be stopped, changed, or reduced. When an anti-inflammatory medicine or aspirin remains necessary, a clinician may recommend stomach-protecting treatment. Avoid adding over-the-counter ibuprofen, naproxen, or aspirin without checking whether it is safe.
Food does not cure an ulcer, and a strict “ulcer diet” is not normally needed. You can limit foods or drinks that clearly make your symptoms worse. Common triggers include alcohol, coffee, fatty meals, and very spicy food, but triggers differ between people.
A bleeding ulcer may be treated during endoscopy by sealing, clipping, or injecting the bleeding area. Severe bleeding may require a blood transfusion, a procedure to block the bleeding blood vessel, or surgery. Surgery may also be needed for a perforation or persistent blockage.
Medicines commonly used for this include lansoprazole. Which one suits you, if any, is a decision for you and your doctor.
Most ulcers heal without a major complication when the cause is treated. Possible complications include:
A gastric ulcer is not automatically cancer. However, some stomach cancers first appear to be ulcers. This is why biopsy and, in some cases, follow-up endoscopy are important.
Not every gastric ulcer can be prevented. There is no vaccine routinely available to prevent H. pylori, and people may carry the infection without symptoms.
You can reduce avoidable risks by using NSAIDs only as directed and avoiding two NSAIDs at the same time. Tell a clinician or pharmacist about any previous ulcer or bleeding before starting one. Acetaminophen, also called paracetamol, is not an NSAID, but it is not suitable for every person or every type of pain.
If you need long-term aspirin or an NSAID, your risk of ulcer complications can be reviewed. Some people benefit from protective acid-suppressing medicine.
Not smoking supports healing and lowers the chance of recurrence. Limiting alcohol may reduce stomach irritation and bleeding risk.
Many gastric ulcers heal over several weeks with effective treatment, although the timing is not the same for everyone. Pain may improve before the stomach lining has fully healed, so continue treatment and follow-up as advised.
If H. pylori is successfully cleared, an ulcer caused by the infection is less likely to return. Recurrence is more likely if the infection remains, NSAIDs continue without suitable protection, or smoking continues.
Routine follow-up may include reviewing symptoms, confirming that H. pylori has cleared, checking for anaemia, and deciding whether another endoscopy is needed. Keep planned follow-up even if you feel better, particularly if a biopsy was taken.
You can usually continue normal daily activities as symptoms allow. Smaller meals may feel more comfortable if you become full quickly. Keep a simple record of medicines and symptom triggers rather than cutting out many foods without a clear reason.
Recurrent pain does not always mean the ulcer has returned. Reflux, stomach inflammation, and functional indigestion can cause similar symptoms, so persistent or returning symptoms should be reassessed.
Seek emergency care now if you have:
These symptoms can indicate heavy bleeding or a perforation.
Arrange prompt medical assessment if you have repeated vomiting, difficulty swallowing, unexplained weight loss, worsening pain, reduced appetite, or symptoms of anaemia such as unusual tiredness and breathlessness.
Routine assessment is appropriate for persistent or recurring upper abdominal pain, indigestion, early fullness, or nausea. Mention any regular use of aspirin, ibuprofen, naproxen, blood thinners, or steroids, as well as any previous ulcer.
If you are already receiving treatment, arrange follow-up if symptoms are not improving, return after treatment, or medication causes troublesome effects. Do not wait for severe pain before seeking advice, because bleeding ulcers may cause little pain.
Can a gastric ulcer heal on its own?
Symptoms may settle temporarily, but the ulcer may remain or return if its cause is not treated. Medical assessment can identify H. pylori, medicine-related damage, bleeding, and ulcers that need biopsy.
What foods should I avoid with a stomach ulcer?
No single diet heals a gastric ulcer. Avoid or reduce foods and drinks that clearly trigger your symptoms. Alcohol, coffee, rich meals, and spicy foods bother some people but not others. Extreme restriction is rarely helpful.
Is a gastric ulcer cancer?
Most gastric ulcers are not cancer. However, stomach cancer can sometimes resemble an ulcer during endoscopy. Biopsy samples are therefore commonly taken, and follow-up may be recommended to confirm healing.
How long does a gastric ulcer take to heal?
Healing usually takes several weeks, but larger ulcers and continued NSAID use may require longer treatment. Feeling better does not always mean the ulcer has completely healed.
Can stress cause a stomach ulcer?
Everyday emotional stress is not a usual direct cause. H. pylori and NSAIDs are much more common causes. Stress may still worsen pain, sleep, eating patterns, or indigestion symptoms.
Is a gastric ulcer contagious?
The ulcer itself is not contagious. H. pylori, one of its main causes, can spread between people, probably through contact with saliva, vomit, or stool. Many infected people never develop an ulcer.
Taken from each medicine’s FDA-approved indication, in alphabetical order. It is not a recommendation, not a full list, and not everyone with this condition takes one. What is right for you is a conversation with your own doctor.
sofidex [Internet]. Daloreum; c2026. Gastric ulcer; [reviewed 2026 Aug 9; cited 2026 Nov 10]. Available from: https://sofidex.com/patients/conditions/gastric-ulcer
sofidex. (2026, August 9). Gastric ulcer. Daloreum. Retrieved November 10, 2026, from https://sofidex.com/patients/conditions/gastric-ulcer
Gastric ulcer. sofidex. Reviewed August 9, 2026. Accessed November 10, 2026. https://sofidex.com/patients/conditions/gastric-ulcer
The cited date is today’s, because a citation records when you read the page. The reviewed date is when a clinician last checked it.