Treating a stomach ulcer 

If you have a stomach ulcer, your treatment will depend on whether the cause is an H. pylori infection or non-steroidal anti-inflammatory drugs (NSAIDs) or both.

If your stomach ulcer is caused by an H. pylori infection, a course of antibiotics is recommended. This is known as eradication therapy because it will kill the bacteria.

If your stomach ulcer is caused by NSAIDs and you don't have a H. pylori infection, a one-to two-month course of proton pump inhibitors (PPIs) is recommended. Your use of NSAIDs will also need to be reviewed and an alternative painkiller, such as paracetamol, may be recommended.

If it's thought your stomach ulcer is caused by a combination of NSAID use and an H. pylori infection, you will be given a two-month course of PPIs and a course of antibiotics (eradication therapy).

An alternative type of medication, known as H2-receptor antagonists, is sometimes used instead of PPIs.

Eradication therapy

Eradication therapy involves taking a combination of two or three different antibiotics and a proton pump inhibitor (PPI), at the same time. Taking one antibiotic alone is insufficient to kill the bacteria. You will usually be asked to take each antibiotic twice a day for 7-14 days. The antibiotics most commonly used in eradication therapy are:

The side effects are usually mild and include:

  • feeling sick
  • diarrhoea
  • a metallic taste in your mouth
  • grey colouring of saliva or your stools

You will be re-tested at least four weeks after eradication therapy has been completed to see whether there are any H. pylori bacteria left in your stomach. If there are, a further course of eradication therapy using different antibiotics will be given.

Proton pump inhibitors (PPIs)

Proton pump inhibitors (PPIs) work by blocking the actions of proteins called proton pumps, which are partially responsible for producing stomach acid. Reducing the amount of stomach acid prevents further damage to the ulcer, allowing it to heal naturally.

Lansoprazole and omeprazole are the two PPIs most commonly used to treat stomach ulcers. Side effects of these are usually mild but include:

These should pass once treatment has been completed.

H2-receptor antagonists

H2-receptor antagonists work by blocking the actions of a protein called histamine, which is also responsible for stimulating the production of acid.

Ranitidine is the most widely used H2-receptor antagonist for treating stomach ulcers.

Side effects are uncommon but may include:

  • diarrhoea
  • headaches
  • dizziness
  • skin rashes
  • tiredness

Antacids and alginates

All of the above treatments can take several hours before they start to work, so it's likely your GP will recommend additional medication to help provide short-term symptom relief. This is likely to be either:

  • antacids – to help neutralise stomach acid on a short-term basis
  • alginates – which produce a protective coating on the lining of your stomach

Both antacids and alginates are available to buy over the counter at pharmacies. Your pharmacist will be able to advise you about the types most suitable for you.

Antacids are best taken when you experience symptoms or when you expect them, such as after meals or at bedtime. Alginates are best taken after meals.

Don't take these medications within an hour of taking proton pump inhibitors or ranitidine as they may block the effects.

Side effects for both medications are uncommon but include:

Bananas are also thought to be effective at protecting against stomach acid, and can be an alternative way to relieve your symptoms, if you don't want to take antacids or alginates.

Reviewing NSAID use

If your stomach ulcer has been caused by taking NSAIDs, your GP will want to review your use of them.

You will usually be advised to use an alternative painkiller not linked to stomach  ulcers, such as paracetamol or a low-dose opiate-based painkiller.

If you are taking low-dose aspirin to reduce your risk of getting blood clots, your GP will help you decide whether you need to continue taking it. In most cases it is continued or only stopped for a few days.

In these cases a PPI is given as well as the aspirin to try to prevent further ulceration. If you or your GP feel the continued use of NSAIDs is absolutely necessary, you will be prescribed a long-term course of a PPI or H2-receptor antagonist.

It's important to understand the potential risks associated with continued NSAID use. You are more likely to develop another stomach ulcer and the risks of experiencing serious complications, such as internal bleeding, are higher.

Read more about the complications of stomach ulcers.




Stress does not cause stomach ulcers but it may make them worse. An expert explains what stress is, the physical and mental effects of being stressed, when it becomes a problem and when to seek help.

Media last reviewed: 21/09/2014

Next review due: 21/09/2016

Lifestyle advice

Diet and stress are not thought to be directly responsible for stomach ulcers but they may make the symptoms of ulcers worse.

The following advice may be of some help:

  • Cut down on the amount of coffee and tea you drink. This can increase the amount of acid your stomach produces. Try herbal teas instead.
  • Drink milk and eat milk-based foods, such as yoghurt and cheese. Milk is thought to coat the stomach and neutralise the effects of stomach acid.
  • Lose any extra weight you are carrying.
  • Eat little and often. This could help reduce the build-up of stomach acid between meals.
  • Limit your intake of alcohol. Too much alcohol can irritate the areas of inflammation in your stomach. 
  • Avoid spicy or excessively rich foods if they make your symptoms worse.
  • Quit smoking. It may put you at greater risk of developing an ulcer and slow down your recovery.

Read information and advice on managing stress.

Page last reviewed: 19/07/2013

Next review due: 19/07/2015