An esophageal ulcer is a type of peptic ulcer. It’s a painful sore located in the lining of the lower part of the esophagus, at the junction of the esophagus and stomach.


In April 2020, the Food and Drug Administration (FDA) requested that all forms of prescription and over-the-counter (OTC) ranitidine (Zantac) be removed from the U.S. market. This recommendation was made because unacceptable levels of NDMA, a probable carcinogen (cancer-causing chemical), were found in some ranitidine products. If you’re prescribed ranitidine, talk with your doctor about safe alternative options before stopping the drug. If you’re taking OTC ranitidine, stop taking the drug and talk with your healthcare provider about alternative options. Instead of taking unused ranitidine products to a drug take-back site, dispose of them according to the product’s instructions or by following the FDA’s guidance.

Ranitidine, brand name Zantac, is now marketed as Zantac 360, which contains a different active ingredient (famotidine). Famotidine is in the same class as ranitidine and works the same way but has not been found to contain unacceptable levels of NDMA.

Your esophagus is the tube connecting your throat to your stomach. Esophageal ulcers usually form as a result of an infection with a bacterium called Helicobacter pylori. It can also be caused by erosion from stomach acid moving up into the esophagus. In some cases, other infections from yeast and viruses can also in result in esophageal ulcers.

An esophageal ulcer can be painful. Fortunately, medications and lifestyle changes can help you recover from an esophageal ulcer.

The most common symptom of an esophageal ulcer is burning pain in the chest. The pain can be mild or severe. Other symptoms of an esophageal ulcer include:

  • nausea
  • indigestion
  • acid reflux (heartburn)
  • bloating
  • vomiting
  • lack of appetite
  • pain when swallowing
  • dry cough
  • sour taste in the mouth

However, some people don’t experience any symptoms at all.

In the past, doctors thought ulcers were caused by stress or spicy foods. It’s now known that this is not the case, though these factors may aggravate an existing ulcer.

Most often, an esophageal ulcer is caused by a bacterium known as Helicobacter pylori, or H. pylori for short. The bacteria damage the mucosal lining of the esophagus. This makes the esophagus more susceptible to damage by stomach acid.

A chronic condition known as gastroesophageal reflux disease (GERD) may also eventually lead to an esophageal ulcer. People with GERD have frequent acid reflux.

Acid reflux occurs when stomach contents move backward into the esophagus. This can happen when the lower esophageal sphincter (the muscle that tightens to prevent food in the stomach from moving back up) is weakened or damaged so it doesn’t close properly.

People with GERD experience acid reflux more than twice a week.

Smoking, excessive alcohol consumption, and frequent use of nonsteroidal anti-inflammatory drugs (NSAIDs), such as ibuprofen, can also damage the mucosal lining of the esophagus and result in an ulcer. Genetics can also play a role.

Several pills, such as potassium, may cause esophageal irritation and ulcer, especially if taken without sufficient water or lying down immediately after taking. Whenever you take any types of pills, it’s important to swallow them with plenty of water.

In people who have compromised immune systems, esophageal ulcers may be caused by other bacterial, fungal, or viral infections, including:

Treatment of an esophageal ulcer depends on the cause. If your ulcer is caused by an infection with H. pylori, for example, your doctor will prescribe antibiotics to kill the bacteria.

If your ulcer is caused by NSAID use, your doctor will tell you to stop taking NSAIDs. They might prescribe a different pain medication.

Your doctor may have you take over-the-counter H2 receptor blockers such as Pepcid to help decrease stomach acid. They may also prescribe a proton pump inhibitor (PPI) to protect your esophagus and allow it to heal.

These drugs work by stopping the production of stomach acid in a different way. PPIs include:

Listen carefully to your doctor’s instructions. You might have to take a PPI for an extended period of time. It’s important to take all medications as directed and finish all antibiotics so the ulcer has a chance to fully heal.

Depending on the cause of your ulcer, you may need to take antifungal or antiviral medications as well.

Your symptoms might go away within a few days of starting treatment. Even still, it’s important to continue taking your medications for as long as your doctor tells you to do so. Be sure to drink plenty of water and remain upright after swallowing any pills.

While you take your medications, you can speed your recovery by making a few simple, healthy lifestyle changes. These include:

  • finding ways to reduce stress, such as by exercising or taking a yoga class
  • getting adequate sleep
  • eating a diet high in fruits, vegetables, and whole grains, and low in processed or sugary foods
  • eating smaller meals more frequently
  • chewing gum after meals to help increase saliva and keep acid out of the esophagus
  • staying upright for a couple hours after eating
  • avoiding alcohol
  • drinking lots of water
  • refraining from smoking
  • losing weight if you are overweight

As part of your treatment, your doctor may recommend dietary changes. Despite popular belief, it’s not necessary to eat a bland diet or to avoid spices altogether. Instead, it’s recommended that you consume a diet high in fiber, fruits, and vegetables.

You should also avoid anything that that makes your symptoms worse. Symptoms are made worse by foods that relax the esophageal sphincter. Try keeping a food diary to track what foods trigger your symptoms. This information can help you eliminate troublesome foods.

Foods to eat

Diets high in fiber have been shown to be particularly beneficial for people with ulcers. You may find adding these foods to your diet helpful:

  • oats
  • whole grains
  • legumes
  • flax seeds
  • nuts
  • fruits, such as apples and bananas
  • vegetables, such as carrots, broccoli, sweet potatoes, spinach, and kale
  • lean protein

Foods to avoid

Foods that can worsen acid reflux may include:

  • coffee, tea, and other caffeinated beverages
  • soda
  • chocolate
  • alcohol
  • mint
  • tomatoes
  • citrus fruits
  • spicy foods
  • fatty, greasy, or fried foods
  • any trigger foods you identify

Untreated ulcers can lead to serious complications, such as a bleeding ulcer or an esophageal perforation (hole in the esophagus). They can also cause scarring and narrowing of the esophagus. See your doctor right away if you have the following symptoms:

  • fever
  • chills
  • rapid heart rate
  • trouble breathing
  • vomiting blood
  • sudden chest pain or shortness of breath

The outlook is good if you seek timely treatment, however. Esophageal ulcers can usually be treated with a combination of antibiotics, medications to reduce stomach acid, and diet and lifestyle changes.

If you don’t already have a primary care doctor, you can browse doctors in your area through the Healthline FindCare tool.

Read this article in Spanish.