HomeArrow IconOur BlogArrow IconTreatment of Stomach Ulcer - Best Medications, Treatment Duration, and When You Need an Endoscopy

Treatment of Stomach Ulcer - Best Medications, Treatment Duration, and When You Need an Endoscopy

June 2, 2026

Share

Facebook IconTwitter IconLinkedin IconInstagram IconEmail Icon

Last updated: 2/6/2026

Treatment of stomach ulcer begins by identifying the cause, not by taking an acidity medicine only. An ulcer may occur because of H. pylori, repeated use of some painkillers such as ibuprofen, or other less common factors.

Therefore, when searching for the best treatment for stomach ulcer or the best medicine for treating stomach ulcer, the first question should be: what is the cause of the ulcer? An ulcer caused by H. pylori needs a different treatment from an ulcer caused by painkillers.

Correct treatment of stomach ulcer depends on three main pillars: reducing stomach acid, treating the cause, and following up on ulcer healing. If signs of bleeding, severe pain, vomiting blood, or black stool appear, treating stomach ulcer at home is not enough, and a doctor must be consulted immediately.

What Is the Treatment of Stomach Ulcer?

Treatment of stomach ulcer is a medical plan that aims to heal the wound in the lining of the stomach or duodenum. Treatment of stomach ulcer often includes medicines that reduce stomach acid, antibiotics when H. pylori is present, and stopping painkillers that irritate the stomach when possible.

Mayo Clinic explains that ulcer treatment may include killing H. pylori, stopping or reducing nonsteroidal anti-inflammatory drugs, and using medicines that help heal the ulcer.

There is no best treatment for stomach ulcer that suits all cases. The doctor chooses the treatment of stomach ulcer according to the cause, severity of symptoms, presence of bleeding, patient’s age, and the medicines the patient uses.

What Causes of Stomach Ulcer Determine the Treatment?

The most important causes of stomach ulcer are H. pylori and regular use of nonsteroidal anti-inflammatory drugs such as ibuprofen.

These two causes are among the main causes of stomach ulcer.

This is important because treatment of stomach ulcer caused by H. pylori differs from treatment of stomach ulcer caused by painkillers.

If the ulcer is caused by H. pylori, the patient usually needs antibiotics with proton pump inhibitors. If it is caused by painkillers, the doctor may recommend stopping them, changing them, or reducing their dose, while using a medicine that protects the stomach.

NIDDK explains that treating the cause helps the ulcer heal and reduces the chance of its recurrence.

What Are the Medications for Stomach Ulcer Treatment?

Treatment of stomach ulcer with medications depends on the cause of the ulcer and the severity of symptoms. Therefore, the doctor may prescribe one medicine or more, and it is not recommended to use stomach ulcer medications randomly without a clear diagnosis.

Proton Pump Inhibitors

Proton pump inhibitors are among the most important stomach ulcer pills. They reduce stomach acid secretion, which helps the stomach lining heal and gradually relieves pain.

Examples include:

  • Omeprazole.
  • Esomeprazole.
  • Pantoprazole.
  • Lansoprazole.
  • Rabeprazole.

These medicines are often used as pills. In some cases of bleeding stomach ulcer, they may be given in hospital through an intravenous route.

Antibiotics When H. pylori Is Present

If testing confirms the presence of H. pylori, treatment of stomach ulcer usually requires antibiotics with a medicine that reduces stomach acid. In this case, using acidity medicine alone is not enough.

The doctor often prescribes more than one antibiotic, with a proton pump inhibitor, and may add other medicines such as bismuth depending on the case.

It is necessary to complete antibiotic doses as prescribed by the doctor, even if symptoms improve early.

The Saudi Food and Drug Authority confirms that using antibiotics without a prescription or stopping them before the specified duration may contribute to antibiotic resistance and treatment failure.

H2 Receptor Blockers

H2 receptor blockers may be used in some cases to reduce stomach acid secretion and relieve ulcer pain. Examples include famotidine and cimetidine.

They may be suitable for some patients, but the doctor is the one who determines whether they are enough alone or whether stronger treatment is needed.

Antacids

Antacids may quickly relieve pain and burning, but they are not considered the main treatment of stomach ulcer. They help calm symptoms temporarily, but they do not treat the cause of the ulcer and do not guarantee its healing.

Therefore, they should not be relied on alone if symptoms are persistent or recurrent.

Medicines That Protect the Stomach Lining

The doctor may prescribe medicines that help protect the lining of the stomach and small intestine, such as sucralfate or misoprostol, especially in some cases that need additional support for ulcer healing.

These medicines are used according to the doctor’s assessment, especially if the ulcer is linked to the use of painkillers or irritation of the stomach lining.

How Long Does Stomach Ulcer Treatment Take?

The duration of stomach ulcer treatment differs from one person to another depending on the cause of the ulcer, its severity, and the presence of H. pylori or complications such as bleeding. Therefore, there is no single duration that suits all patients.

In many cases, treatment of stomach ulcer may take from several weeks to about two months. The doctor may need follow-up tests to confirm the success of treatment and healing of the ulcer.

In practical terms:

  • Treatment of H. pylori with antibiotics takes a specific duration determined by the doctor.
  • Healing of stomach ulcer often needs several weeks.
  • Treatment of stomach and duodenal ulcer may differ depending on the location of the ulcer and the severity of symptoms.
  • Severe or recurrent stomach ulcer may need longer follow-up.
  • Persistence of symptoms after treatment needs a new medical evaluation.
  • Appearance of vomiting blood or black stool needs urgent consultation.

Disappearance of pain does not always mean that the ulcer has healed completely. Therefore, the duration of stomach ulcer treatment must be followed as determined by the doctor, and the medicine should not be stopped on your own.

Can Stomach Ulcer Be Treated Permanently?

Stomach ulcer can be treated successfully in most cases if the cause is treated.

Mayo Clinic explains that treatment of peptic ulcers usually succeeds in healing ulcers. However, if symptoms are severe or persistent despite treatment, the doctor may need to perform an endoscopy to rule out other causes.

Stomach ulcer may return if:

  • The doses of H. pylori treatment are not completed.
  • The use of painkillers that irritate the stomach continues.
  • Smoking continues.
  • The condition is not followed up after treatment.
  • The ulcer is caused by a less common reason.

Therefore, permanent treatment of stomach ulcer does not mean simply calming the pain. It means treating the cause and confirming that the ulcer has healed.

When Does Stomach Ulcer Need an Endoscopy?

The doctor may need stomach ulcer endoscopy when an ulcer is suspected, or when symptoms appear that require a more accurate examination.

Endoscopy helps see the esophagus, stomach, and beginning of the duodenum from the inside, which clarifies the location of the ulcer, its size, and the degree of inflammation of the stomach lining.

You may need gastroscopy in the following cases:

  • Persistence of symptoms despite treatment of stomach ulcer.
  • Severe or recurrent pain in the upper abdomen.
  • Vomiting blood.
  • Black stool or blood in the stool.
  • Unexplained weight loss.
  • Difficulty or pain when swallowing.
  • Loss of appetite or feeling full quickly.
  • Suspicion of bleeding from the stomach.
  • Need to take a sample from the stomach lining.
  • Follow-up of ulcer healing after treatment, especially in some cases of stomach ulcer.

Endoscopy is not used in all cases of stomach ulcer treatment, but it becomes important when symptoms are strong, persistent, or accompanied by warning signs.

Does Endoscopy Treat Stomach Ulcer or Only Diagnose It?

Endoscopy is often used to diagnose stomach ulcer, identify its location, and take a sample when needed. However, it may also be a treatment in cases of bleeding.

Mayo Clinic mentions that serious complications such as bleeding or stomach perforation may require treatment by endoscopy or surgery.

Therefore, treatment of stomach ulcer by endoscopy is not for all patients. It is often used when complications are present, especially bleeding, or when direct evaluation inside the stomach is needed.

When Is Treatment of Stomach Ulcer Urgent?

Immediate medical help must be requested when signs of bleeding or severe pain appear. NHS states the need to go to the emergency department when there is vomiting of red blood or vomit that looks like coffee, blood in the stool, black sticky stool with a very bad smell, or severe abdominal pain.

See a doctor quickly if any of the following appears:

  • Stomach pain that worsens or does not improve.
  • Unexplained weight loss.
  • Repeated vomiting.
  • Difficulty swallowing.
  • Persistent fatigue.
  • Clear loss of appetite.
  • Feeling full quickly after a small amount of food.

In these cases, treatment of stomach ulcer should not be delayed or replaced with home remedies only.

Can Stomach Ulcer Be Treated at Home?

Home treatment is not a substitute for medical treatment of stomach ulcer. However, it helps reduce stomach irritation and support healing after seeing a doctor.

The following steps may help:

  • Eating smaller meals.
  • Avoiding food that irritates symptoms.
  • Not eating directly before sleep.
  • Avoiding smoking.
  • Reducing caffeine if it irritates symptoms.
  • Not using ibuprofen or anti-inflammatory medicines without consulting a doctor.
  • Committing to medications until the end of the duration.

NHS states that the patient can support symptoms by eating smaller meals, avoiding symptom triggers such as fatty or spicy foods, coffee, and chocolate, not smoking, and avoiding excessive alcohol.

What Mistakes Delay Treatment of Stomach Ulcer?

There are common mistakes that may make treatment of stomach ulcer slower or less effective. Some of them lead to continued pain, and some increase the risk of ulcer recurrence or complications.

The most notable of these mistakes are:

  • Stopping the medicine as soon as the pain improves.
  • Not committing to the duration of stomach ulcer treatment determined by the doctor.
  • Using antibiotics without a prescription.
  • Not completing the antibiotic course when treating H. pylori.
  • Taking painkillers that irritate the stomach during treatment, such as some anti-inflammatory medicines.
  • Ignoring H. pylori testing when symptoms recur.
  • Not performing a follow-up examination if the doctor requests it.
  • Relying on herbs or home remedies alone.
  • Continuing smoking.
  • Ignoring warning symptoms such as vomiting blood or black stool.

It is important to understand that improvement of pain does not always mean that the ulcer has healed completely. Therefore, the stomach ulcer treatment plan must be followed until the end, and doses should not be changed or the medicine stopped without consulting the doctor.

Frequently Asked Questions

What Is the Best Treatment for Stomach Ulcer?

The best treatment for stomach ulcer is the treatment that addresses the cause. If H. pylori is present, the patient needs antibiotics with a medicine that reduces acid. If the ulcer is caused by painkillers, the doctor may recommend stopping them or changing them while using proton pump inhibitors.

How Long Does Stomach Ulcer Treatment Take?

The duration of stomach ulcer treatment may range from one week to two months depending on the cause and severity of the ulcer. Some patients need medicines for several weeks until the stomach lining heals, and they may need a follow-up test after treatment.

Does Stomach Ulcer Need an Endoscopy?

Not every ulcer needs an endoscopy. The doctor may recommend endoscopy when there is bleeding, weight loss, difficulty swallowing, persistent pain, severe symptoms, or no improvement despite treatment. Endoscopy may also be used to follow up on stomach ulcer healing.

Can Stomach Ulcer Be Treated Permanently?

Yes, stomach ulcer can be treated in most cases if the cause is treated and the medications are followed. However, ulcer recurrence is possible if H. pylori persists, irritating painkillers are used, or the patient does not follow the treatment plan.

Do Stomach Ulcer Medications Need a Prescription?

Some acidity medicines are available without a prescription, but they are not always enough to treat stomach ulcer. H. pylori medicines and antibiotics require a prescription and must be used under medical supervision to avoid antibiotic resistance or treatment failure.

 

Medical Review:
Reviewed by the Magrabi editorial team with the assistance of specialized doctors.

Disclaimer:
This article is for health education purposes only and is not a substitute for consulting a specialist doctor.

Conclusion

Treatment of stomach ulcer depends on the cause, especially H. pylori or the use of anti-inflammatory painkillers, and it is not one medicine for all cases.

Proton pump inhibitors and antibiotics, when needed, often help heal the ulcer. However, vomiting blood, black stool, severe pain, weight loss, or persistence of symptoms requires seeing a doctor immediately.

References