Stomach ulcer
A stomach ulcer is an open sore in the lining of the stomach, most often caused by H. pylori bacteria or by anti-inflammatory painkillers such as ibuprofen.

Overview
A stomach ulcer is a raw, open sore in the inner lining of your stomach. Doctors call it a gastric ulcer. It is one kind of peptic ulcer, a name for ulcers in the stomach or in the first part of the small intestine (the duodenum).
Your stomach makes strong acid to digest food. Normally a layer of mucus and other natural defences protect the stomach lining from that acid. When those defences are weakened, acid can eat into the lining and create a sore. The two most common reasons are an infection with bacteria called Helicobacter pylori (H. pylori) and regular use of anti-inflammatory painkillers known as NSAIDs (non-steroidal anti-inflammatory drugs), such as ibuprofen, naproxen and aspirin.
Stomach ulcers are common and, in most cases, they heal well with treatment. Treating the cause is the key to stopping them from coming back. Because a small number of stomach sores turn out to be cancer, doctors usually look at a stomach ulcer closely and check that it has healed.
Symptoms
Some people have no symptoms at all, especially older adults and people taking NSAIDs. When symptoms do happen, they can include:
- A burning or gnawing pain in the upper middle part of your belly, between your breastbone and belly button
- Pain that may get worse soon after eating
- Feeling full quickly, bloating or burping
- Indigestion or heartburn
- Feeling sick (nausea)
- Poor appetite and losing weight without trying
The pain can come and go over days or weeks. Some people find it wakes them at night.
Warning signs
Some symptoms can mean the ulcer is bleeding or has caused another serious problem:
- Vomiting blood, or vomit that looks like coffee grounds
- Black, sticky, tar-like stools
- Sudden, severe belly pain that does not go away
- Feeling faint, dizzy or very weak
- Repeated vomiting, or being unable to keep food down
- Difficulty swallowing or unexplained weight loss
These need medical attention quickly. See the section on when to get help below.
Causes
H. pylori infection
H. pylori is a common germ that lives in the stomach. Many people pick it up in childhood and carry it for years without knowing. In some people it causes long-lasting inflammation (irritation and swelling) of the stomach lining, which can lead to an ulcer. It is thought to spread from person to person and through contaminated food or water.
NSAIDs and aspirin
Medicines such as ibuprofen, naproxen, diclofenac and aspirin reduce pain and swelling, but they also lower the stomach's ability to protect itself. Taking them often, at high amounts or for a long time raises the risk of an ulcer. Even low-dose aspirin taken to protect the heart can cause ulcers in some people.
Less common causes
- Severe physical stress, such as a major illness, serious burns or a stay in intensive care
- Some other medicines, especially when combined with NSAIDs, such as steroid tablets, blood thinners and certain antidepressants (SSRIs)
- Stomach cancer, which can look like an ulcer
- Rare conditions that cause the body to make too much acid
Spicy food and everyday stress do not cause ulcers, although they may make symptoms feel worse for some people.
Risk factors
You are more likely to get a stomach ulcer if you:
- Have an H. pylori infection
- Take NSAIDs or aspirin regularly
- Are over 65
- Have had an ulcer before
- Take steroids, blood thinners or SSRI antidepressants along with an NSAID
- Smoke
- Drink a lot of alcohol
- Have a serious long-term illness, such as kidney, liver or heart disease
Diagnosis
Your doctor will ask about your symptoms and the medicines you take, including ones you buy without a prescription. They may gently press on your belly.
Tests for H. pylori
- Breath test: you drink a special liquid and breathe into a bag or tube.
- Stool test: a small sample of your poop is checked for signs of the germ.
- Biopsy: a tiny piece of stomach lining taken during an endoscopy.
Some medicines, such as acid-reducing pills and antibiotics, can make these tests less accurate. Your doctor may ask you to stop them for a short time before testing. Do this only if your doctor tells you to.
Endoscopy
An upper endoscopy (also called a gastroscopy) is the main test to see a stomach ulcer. A doctor passes a thin, flexible tube with a camera through your mouth into your stomach. You are usually given a sedative or a throat spray to make it more comfortable. It takes about 10 to 15 minutes.
With stomach ulcers, the doctor usually takes small samples (biopsies) from the edge of the ulcer to make sure it is not cancer. Many people are offered a second endoscopy several weeks after treatment to check that the ulcer has fully healed.
Other tests
A blood test can check for anemia (a low red blood cell count), which can happen if an ulcer bleeds slowly.
Treatment
Treatment aims to heal the ulcer, ease pain, and remove the cause so it does not return.
Medicines that lower stomach acid
- Proton pump inhibitors (PPIs), such as omeprazole, lansoprazole, pantoprazole and esomeprazole, strongly reduce the amount of acid your stomach makes. They are the main treatment. A stomach ulcer is usually treated for about 8 weeks, sometimes longer.
- H2 blockers, such as famotidine, cimetidine and nizatidine, also lower acid, but less strongly. They may be used when a PPI is not suitable.
Treating H. pylori
If you have H. pylori, you will take a combination of medicines, usually for 14 days. This is often a PPI plus two or three antibiotics (such as amoxicillin, clarithromycin, metronidazole or tetracycline), sometimes with bismuth. Taking every dose, even if you feel better, gives the best chance of clearing the infection. Side effects can include feeling sick, diarrhea or a metallic taste, and bismuth turns stools dark or black, which is harmless. Ask your pharmacist whether you should avoid alcohol while taking these medicines, as some of them react badly with it. A test about 4 weeks or more after finishing checks that the germ is gone.
Stopping or changing NSAIDs
If an NSAID is the cause, your doctor may suggest stopping it or switching to another pain reliever, such as acetaminophen (paracetamol). If you need to keep taking an NSAID or aspirin for another health condition, your doctor may add a PPI to protect your stomach. Do not stop aspirin or other prescribed medicines on your own; talk to your doctor first, because some protect your heart.
Other medicines
- Sucralfate forms a protective coating over the ulcer.
- Antacids, such as aluminum hydroxide, magnesium hydroxide and calcium carbonate, neutralize acid and can give quick, short-term relief, but they do not heal an ulcer on their own.
Treatment for complications
A bleeding ulcer is usually treated during an endoscopy, for example by injecting medicine, using heat or placing small clips. Surgery is now rarely needed, but may be used for a hole in the stomach wall or bleeding that cannot be controlled in other ways.
Living with a stomach ulcer
Most ulcers heal within a couple of months with treatment. These steps can help you feel better and recover:
- Take your medicines exactly as prescribed and finish the full course.
- Check with a pharmacist or doctor before taking any over-the-counter painkiller. Many cold, flu and pain products contain NSAIDs or aspirin.
- Stop smoking. Smoking slows healing and makes ulcers more likely to come back.
- Limit alcohol, which can irritate the stomach lining.
- Eat regular meals. If certain foods make your symptoms worse, try avoiding them. There is no special diet that heals ulcers.
- Keep any follow-up appointments, including a repeat endoscopy or breath test if your doctor recommends one.
Complications
Without treatment, a stomach ulcer can lead to serious problems:
- Bleeding: the most common complication. It can be slow, causing tiredness and anemia, or sudden and heavy.
- Perforation: the ulcer makes a hole through the stomach wall. This causes sudden, severe pain and is a medical emergency.
- Gastric outlet obstruction: swelling or scarring blocks food from leaving the stomach, causing vomiting and fullness.
Long-term H. pylori infection also raises the risk of stomach cancer, which is another reason to treat it.
Outlook
The outlook for most people is very good. With acid-reducing medicine and treatment of the cause, most stomach ulcers heal completely. Once H. pylori is cleared and NSAIDs are avoided or used with stomach protection, ulcers are much less likely to come back. Complications are serious but less common when ulcers are treated early.
Prevention
- Use NSAIDs only when needed, at the lowest effective amount, for the shortest time.
- Ask your doctor about stomach protection if you must take NSAIDs or aspirin long term, especially if you are older or have had an ulcer.
- Get tested and treated for H. pylori if your doctor recommends it, for example if you have ongoing indigestion.
- Wash your hands before eating and after using the toilet, and drink clean water.
- Do not smoke, and keep alcohol to a moderate level.
In Canada
In Canada, H. pylori treatment commonly follows the Toronto Consensus, which favours 14-day quadruple therapy. Ranitidine is no longer sold in Canada. Coverage of urea breath tests and medicines varies by province and private plan.
When to get medical help
See a doctor if you:
- Have upper belly pain or indigestion that keeps coming back or lasts more than a couple of weeks
- Need antacids or heartburn medicine most days
- Are losing weight without trying, or have a poor appetite
- Have trouble swallowing
- Feel unusually tired, short of breath or pale, which can be a sign of slow bleeding
- Are over about 55 and have new indigestion that does not settle
Go to emergency or call emergency services if you:
- Vomit blood or something that looks like coffee grounds
- Have black, tar-like or bloody stools
- Have sudden, severe belly pain, especially if your belly feels hard
- Feel faint, dizzy, confused or have a fast heartbeat
In an emergency, call 911.
References
- U.S. National Library of Medicine. MeSH: Stomach Ulcer. meshb.nlm.nih.gov
- MedlinePlus: Peptic Ulcer. medlineplus.gov/pepticulcer.html
- NIDDK: Peptic Ulcers (Stomach and Duodenal Ulcers). niddk.nih.gov/health-information/digestive-diseases/peptic-ulcers-stomach-ulcers
- NHS: Stomach ulcer. nhs.uk/conditions/stomach-ulcer/
- NICE: Gastro-oesophageal reflux disease and dyspepsia in adults (CG184). nice.org.uk/guidance/cg184