Heartburn Treatment

Medically Reviewed by Sabrina Felson, MD on November 09, 2022
7 min read

If you’ve ever felt like your chest was on fire after eating a big or greasy meal, then you’re probably familiar with heartburn. Whether it happens to you occasionally or more often, you can take simple steps to soothe the burn. Learn more about why heartburn happens, who’s at risk, and how to stop -- and prevent -- the pain.

Several types of over-the-counter (OTC) and prescription medicines can help with heartburn. Your doctor or pharmacist can help you find the one that’s right for you.

 

Types of medicine

How they work

How fast they start working

How long the effects last

Side effects

Antacids

 

They neutralize stomach acid.

Within seconds

Up to 3 hours

Some cause constipation and diarrhea.

H2 Blockers

 

They lower the amount of acid your stomach makes.

In about 30 minutes

Up to 12 hours

They may cause constipation, diarrhea, headache, nausea, or vomiting.

 

Proton-Pump Inhibitors (PPIs)

 

They lower the amount of acid your stomach makes.

Up to 4 days

Up to 24 hours

They may cause diarrhea, headache, stomach pain, nausea, or vomiting.

 

 

 

 

 

 

 

 

Antacids

Soothe occasional, mild heartburn with an antacid that contains calcium carbonate or magnesium. They help zap stomach acid. Some prevent acid reflux. Those that contain magnesium may also help heal stomach ulcers. They come in liquids and pills and are fast-acting.

Antacids can cause constipation and diarrhea. Look for brands that contain calcium carbonate, magnesium hydroxide, and aluminum hydroxide to reduce these side effects. Don’t take antacids with magnesium if you have chronic kidney disease. Some antacids have a lot of salt, so you should take them only for occasional heartburn.

H2 Blockers

H2 blockers help relieve and prevent occasional heartburn by lowering the amount of acid your stomach makes. Though they don’t work as fast as antacids, their effects last longer. Your doctor may tell you to take an antacid and an H2 blocker together. H2 blockers are for short-term use -- less than 2 weeks. You can take them before your meals to prevent heartburn, or at bedtime. They come in liquids and pills.

All H2 blockers work about the same. So if one doesn’t help with your heartburn, switching to a different one isn’t likely to help. Changing to a higher-dose prescription version of the drug might help, though. Talk to your doctor if over-the-counter H2 blockers aren't working for you.

Some H2 blockers can interfere with other drugs, including:

Talk to your doctor if you take any of these medicines and you need to take an H2 blocker.

The most common side effects are mild and include:

  • Constipation

  • Diarrhea

  • Headache

  • Nausea or vomiting

Proton-Pump Inhibitors (PPIs)

PPIs are used to prevent frequent heartburn that happens more than twice a week. They work by lowering the amount of acid your stomach makes. Often, they work better than H2 blockers. You also can take these drugs for a longer period of time than H2 blockers.

PPIs are available over the counter and by prescription. But if you have gastroesophageal reflux disease (GERD), when stomach acid flows back into the tube connecting your stomach and mouth, you may need prescription-strength medication.

You need to take PPIs once a day on an empty stomach so they’ll work best. Usually you’ll take the medicine every morning, about 30 to 60 minutes before you eat breakfast, to control stomach acid.

Talk to your doctor before taking the PPI called omeprazole if you take clopidogrel, a drug used to prevent heart attacks and strokes. Taking the two drugs will make clopidogrel less effective.

The most common side effects of PPIs are mild and include:

  • Diarrhea

  • Headache

  • Nausea and vomiting

  • Stomach pain

PPIs may also raise your chances of getting an infection of the intestines or lungs, but this is rare. These medicines have also been linked to fractures of the hip, wrist, and spine. The risk is highest in people who take PPIs for a year or more.

Prokinetics

Prokinetics help your stomach empty faster, so you have less acid left behind. Usually you take this medicine before meals and at bedtime.

Prokinetics are sold only by prescription.

Prokinetics can have more serious side effects than PPIs or H2 blockers. These include:

If your heartburn isn’t getting better, your medicines cause side effects you can’t handle, or you have other complications, you may need surgery. It is rare to need surgery for heartburn.

There are several different procedures that can reinforce the valve between your esophagus and stomach to keep acid from coming back up. The one used most often is called fundoplication. The surgeon wraps the top part of your stomach around the lower esophagus to increase pressure on the muscle that opens and closes it. There are modified versions of this, too.

The surgery is normally done as a laparoscopy, which requires only small cuts in your abdomen and a short hospital stay.

When is heartburn an emergency?

Heartburn is usually a minor problem that goes away over time. But if you also have other symptoms, it could be a sign that something more serious is wrong. Call your doctor or go to the emergency room if:

  • It hurts to swallow

  • You feel like you’re choking

  • You have black, tarry-looking bowel movements

  • Your mouth or throat hurt when you eat

  • Your voice is hoarse

  • Your vomit contains blood or what looks like coffee grounds

  • You have trouble breathing

Is it heartburn or a heart attack?

Heartburn doesn’t affect your heart, but it can feel a lot like the chest pain that happens during a heart attack. Call 911 if you have any of these symptoms along with chest pain, even if you’re not sure that you’re having a heart attack:

You can also make changes to your diet and lifestyle to help manage your heartburn. You might have noticed that it gets worse when you eat or drink certain things. Here are a few that can trigger heartburn:

  • Alcohol

  • Chocolate

  • Coffee

  • Fatty or fried foods

  • Greasy foods

  • Onions

  • Oranges, lemons, and other citrus fruits and juices

  • Peppermint

  • Sodas and other bubbly drinks

  • Spicy foods

  • Tomatoes and tomato sauce

Big meals can also set off heartburn. Instead of eating three big meals, try to eat several small meals throughout the day.

Some foods and drinks may actually help with your symptoms. You may find relief from:

  • Chewing gum

  • Alkaline foods, including bananas, melons and cucumber

  • Baking soda mixed with water 

  • Watery foods, like celery, lettuce and watermelon 

  • Non-fat milk or yogurt 

  • Ginger

  • Licorice

  • Apple cider vinegar mixed with water

Get your doctor’s OK before you go with any herbal remedies. They can have serious side effects and drug interactions. 

Other things to try include:

  • Don’t lie down for at least 2 to 3 hours after you eat.

  • Lose weight if you’re overweight. Extra pounds put pressure on your stomach, forcing more acid up into your esophagus.

  • Wear loose clothing. Tight clothes that press on your stomach can trigger heartburn.

  • If you smoke, quit. Cigarette smoke relaxes the muscle that prevents acid from backing up into the esophagus. It also may increase how much acid your stomach makes.

  • Check your medicines. Regular use of anti-inflammatory and pain medicines (other than acetaminophen) contributes to heartburn.

  • Avoid high-impact exercise. Bicycle or swim instead of going for a run. You may also have trouble with crunches and inverted poses in yoga.

  • Don’t slouch. Bad posture puts pressure on your abdomen, which can force food and acid back up.

If heartburn bothers you at night:

  • Eat a light dinner and avoid foods that trigger your heartburn.

  • Use blocks or books to raise the head of your bed by 4-6 inches. Or put a foam wedge under your mattress at the head of the bed. Sleeping at an angle will help stop acid from backing up into your esophagus.