Heartburn Prevention and Relief

Medically Reviewed By Megan Soliman, MD
Was this helpful?

Heartburn is the sensation of burning and pain behind the breastbone that may rise up to the throat. The burning pain is the result of stomach acid moving upward into the esophagus. Most often, heartburn occurs during or right after eating or when you lie down too soon after eating. Heartburn is a common symptom of acid reflux. Other names for heartburn include acid indigestion and pyrosis.

This article will explain what it feels like to have heartburn, the common causes of heartburn, and home remedies. It will also discuss treatment options and self-care tips to prevent heartburn.

What does heartburn feel like?

woman opening pill pack
Guille Faingold/Stocksy United

Heartburn is a common digestive symptom — about 15 million Americans experience heartburn every day. The burning pain can vary in intensity from person to person. Some people with heartburn have mild symptoms, such as a slight burning after eating that subsides quickly. Others may have stomach acid that reaches the mouth. Someone with heartburn may experience:

  • a burning pain in the chest that may rise up to your throat, most often after eating
  • a feeling that food is sticking in your throat or chest
  • acidic or bitter taste in the back of your mouth
  • difficulty swallowing
  • worsening pain when you lie flat or bend over

Heartburn vs. heart attack

Heartburn can be very painful and it is possible to mistake heartburn for heart attack and vice versa. In some cases, the symptoms can be a sign of a heart attack or other serious condition. Chest pain from a heart attack usually, but not always, accompanies other symptoms. (Additionally, some people having a heart attack do not experience chest pain.) Call 911 for any of these life threatening symptoms including:

What other symptoms might occur with heartburn?

Heartburn is the result of the backward movement of stomach contents into the esophagus, which can result in a number of symptoms. You may experience heartburn symptoms daily or just once in a while. At times, any of these common symptoms can be severe:

Because heartburn causes chest pain, it is not surprising that some people — especially people with a history of heart problems — may worry that the heartburn pain is chest pain from a heart attack. They are not alone. In 2018, out of 123.4 million emergency department visits not resulting in hospital admission, about 5 million were for nonspecific chest pain. (Abdominal pain, diarrhea, and other digestive disorders accounted for nearly 6.5 million visits.)

While patients may feel silly, if you cannot tell the difference between pain from a heart attack and heartburn, it is always best to be safe and seek prompt medical care.

When should you see a doctor for heartburn?

If heartburn becomes a regular part of your life or it is uncomfortable, it may be time for professional medical care. According to the American Academy of Family Physicians (AAFP), you should contact a doctor for:

Call 911 or go to your nearest emergency department for heartburn when: 

  • You are short of breath.
  • You feel sweaty, clammy, nauseous, or lightheaded.
  • You have chest pain or pressure, which may radiate to the back, neck, shoulder, or arms.

What causes heartburn?

The acid in your stomach is essential for digestion, but when it rises into your esophagus, it causes a burning sensation colloquially known as heartburn.

Normally, when you swallow, the flap valve at the bottom of your esophagus opens to allow the food to travel to your stomach. As soon as the food or drink passes, the flap closes so nothing can come back up. However, in some people, the flap valve is weak and does not close completely. This allows stomach acid to back up.

For most people, occasional heartburn is uncomfortable but not serious. However, frequent heartburn due to long-term acid reflux can cause damage to the esophageal wall. Ongoing acid reflux with potential complications is gastroesophageal reflux disease (GERD).

Common causes of heartburn include:

What can trigger heartburn?

Some foods and circumstances increase the chance of getting heartburn. Risk factors and triggers for heartburn include:

  • drinking alcohol, caffeine, citrus juice, or soda
  • eating chocolate, mint, tomato sauce, onions, and garlic
  • eating spicy, fatty, or fried foods 
  • eating large portions of food or eating just before going to bed
  • smoking
  • feeling stressed
  • wearing clothes with tight waistlines

What are some ways to prevent acid reflux and heartburn? 

Although occasional heartburn usually is not harmful, it can be quite uncomfortable. There are some things you can try at home, without using medication. Here are some tips for preventing and managing heartburn:

  • avoiding eating within 3–4 hours of sleep
  • eating smaller meals
  • eating without alcohol
  • waiting several hours after eating before lying down
  • elevating the head of your bed about 6 inches with blocks under the legs
  • keeping a food journal to see if certain food or drinks trigger heartburn
  • sleeping on your left side
  • wearing clothing that is not tight around the chest and waist
  • maintaining a moderate weight
  • not smoking

Learn about home remedies for heartburn and acid reflux here, including herbal remedies.

How do doctors diagnose the cause of heartburn?

To diagnose the cause of your condition, your doctor will take a medical history, perform an exam, and possibly order tests. In many cases, doctors can diagnose heartburn based on your symptoms. Sometimes, doctors need to order tests to find out if you have GERD or another underlying condition.

Tests your doctor may order include endoscopy and other esophageal testing to check the movement and pressure in your esophagus.

Read everything you need to know about endoscopy here.

To exclude heart attack as a potential cause, the healthcare professional may order these additional tests, depending on your symptoms:

During a physical exam for heartburn, questions your doctor may ask include:

  • What symptoms are you experiencing?
  • How severe are your symptoms?
  • Are your symptoms constant or do they come and go? 
  • When do your symptoms occur?
  • What, if anything, seems to make your symptoms better or worse?
  • Do your symptoms bother you during the night?
  • Do you smoke?
  • What other medical conditions do you have?
  • What medications do you take?

What are the treatments for heartburn? 

Antacids are the main treatment for occasional heartburn. Other OTC medications that decrease stomach acid, such as proton pump inhibitors (PPIs) and H2-blockers, are also effective treatments.

Antacids for treating heartburn

OTC antacids include:

  • aluminum hydroxide and magnesium carbonate (Gaviscon, Almacone)
  • aluminum hydroxide and magnesium hydroxide (Alamag, Antacid M, Maalox HRF, others)
  • calcium carbonate (Tums, Alka Seltzer, Caltrate)
  • calcium carbonate and magnesium hydroxide (Rolaids)
  • simethicone (Maalox Anti-Gas, Mylanta Gas, Gas-X)

Potential side effects of single active ingredient antacids include constipation and diarrhea. The AAFP advises using an antacid that contains both aluminum and magnesium to counteract the potential side effects of antacids containing a single active ingredient.

H2-blockers for treating heartburn

H2-blockers work for heartburn by reducing acid production and secretion in the stomach. This decreases the chance of acid reflux. H2-blockers include:

  • cimetidine (Tagamet)
  • famotidine (Pepcid)
  • nizatidine (Axid)

There are also products that contain both an H2-blocker and an antacid.

FDA recall of ranitidine (Zantac)

Another H2-blocker, ranitidine (Zantac), was recalled by the Food and Drug Administration (FDA) in April 2020. The recall is due to an ongoing investigation of a contaminant linked to cancer.

Proton pump inhibitors for treating heartburn

PPIs decrease the amount of acid your stomach makes. Medications include:

  • esomeprazole (Nexium)
  • lansoprazole (Prevacid)
  • omeprazole (Prilosec)
  • pantoprazole (Protonix)
  • rabeprazole (AcipHex)

Because heartburn medicines work in different ways, you can use them in combination if a single class of medication does not relieve symptoms. Your doctor can help you choose a safe combination.

What is the outlook for people with heartburn?

A few changes to eating habits and lifestyle can help prevent heartburn in many cases. When self-care is not enough, OTC medicines and sometimes prescription medicines can help prevent heartburn and reduce symptoms.

Complications of untreated acid reflux-related heartburn include:

  • acute gastritis 
  • Barrett’s esophagus, a precancerous condition in which long-term acid production damages the lining of the esophagus
  • cancer of the esophagus
  • inflammation of the esophagus
  • esophageal scarring and narrowing
  • gastric ulcer


Heartburn is a burning sensation in the chest, just behind the breastbone. It is often due to acid reflux. Lifestyle modifications, such as eating smaller meals and light exercise after a meal may help prevent heartburn.

The outlook is good for most people who experience occasional heartburn. Heartburn treatment includes medicines to reduce or neutralize stomach acid or reduce acid reflux. Contact a healthcare professional for an evaluation if you need heartburn medication two or more times a week or if the medication is not working.

Frequent heartburn is a sign of GERD, a chronic condition that requires treatment to help prevent complications.

Was this helpful?
Medical Reviewer: Megan Soliman, MD
Last Review Date: 2022 Feb 23
View All Acid Reflux and GERD Articles
THIS TOOL DOES NOT PROVIDE MEDICAL ADVICE. It is intended for informational purposes only. It is not a substitute for professional medical advice, diagnosis or treatment. Never ignore professional medical advice in seeking treatment because of something you have read on the site. If you think you may have a medical emergency, immediately call your doctor or dial 911.
  1. Acid reflux. (n.d.). http://patients.gi.org/topics/acid-reflux/
  2. Acid reflux (GER and GERD) in adults. (2020). https://www.niddk.nih.gov/health-information/digestive-diseases/acid-reflux-ger-gerd-adults/definition-facts
  3. Acid reflux, heartburn, and GERD: What's the difference? (n.d.). https://magazine.medlineplus.gov/article/acid-reflux-heartburn-and-gerd-whats-the-difference
  4. Aluminum hydroxide and magnesium hydroxide. (2019). https://medlineplus.gov/druginfo/meds/a601013.html
  5. Food and Drug Administration. (2020). FDA updates and press announcements on NDMA in Zantac (ranitidine) [Press release]. https://www.fda.gov/drugs/drug-safety-and-availability/fda-updates-and-press-announcements-ndma-zantac-ranitidine
  6. Heartburn. (2021). https://familydoctor.org/condition/heartburn/
  7. Weiss, A. J., et al. Most frequent reasons for emergency department visits, 2018. (2021). https://www.hcup-us.ahrq.gov/reports/statbriefs/sb286-ED-Frequent-Conditions-2018.pdf
  8. Understanding gastroesophageal reflux disease. (n.d.). https://www.asge.org/home/for-patients/patient-information/understanding-gastroesophageal-reflux-disease