The fastest way to get rid of heartburn is to take an over-the-counter antacid, which neutralizes stomach acid on contact and typically brings relief within minutes. But if heartburn keeps coming back, the real fix involves changing when and how you eat, how you sleep, and knowing which medications work best for different situations.
Quick Relief: Matching the Right Medication to the Problem
Over-the-counter heartburn medications fall into three categories, and each works differently. Choosing the right one depends on whether you need relief right now or want to prevent heartburn from starting.
Antacids (like Tums, Rolaids, or Maalox) work the fastest. They directly neutralize the acid already in your stomach, so you feel better within minutes. The tradeoff is that relief doesn’t last very long, usually just an hour or two. These are best for occasional, mild episodes.
H2 blockers (like famotidine, sold as Pepcid) reduce the amount of acid your stomach produces. They take longer to kick in than antacids but provide relief that lasts several hours. One downside: with regular use, your body can develop tolerance, meaning they gradually become less effective over time.
Proton pump inhibitors, or PPIs (like omeprazole, sold as Prilosec) are the strongest option. They block the final step of acid production entirely, creating a deep, long-lasting suppression regardless of what triggered the acid in the first place. They’re not designed for instant relief. PPIs take days to reach full effect and are meant for frequent heartburn, defined as two or more episodes per week. They shouldn’t be used for more than 14 days at a time without medical guidance.
The Baking Soda Option
Baking soda (sodium bicarbonate) is a legitimate antacid that many people already have in their kitchen. According to Mayo Clinic dosing guidelines, the typical amount is half a teaspoon dissolved in a glass of water, taken every two hours as needed. The daily limit is five teaspoons, and you shouldn’t use it for more than two weeks straight.
This works because sodium bicarbonate directly neutralizes hydrochloric acid in the stomach. But it’s a short-term fix only. Overuse can throw off your body’s acid-base balance, and the high sodium content is a concern for anyone watching their salt intake or managing blood pressure.
Foods That Make Heartburn Worse
Certain foods don’t just irritate your stomach. They physically weaken the muscular valve between your esophagus and stomach (called the lower esophageal sphincter), allowing acid to splash upward. Understanding this helps explain why avoiding these foods actually works.
High-fat meals are the biggest culprit. Fat lowers the pressure in that valve, increases the rate at which it spontaneously relaxes, and slows stomach emptying, meaning acid sits around longer with more opportunity to reflux. Dairy can trigger a similar chain of events in some people because lactose increases the number of times the valve relaxes and raises acid exposure in the esophagus.
Spicy foods, particularly those containing capsaicin (the compound that makes peppers hot), can delay stomach emptying and directly irritate esophageal tissue that’s already inflamed. Even high salt intake has been linked to heartburn, likely because it slows the stomach’s ability to move food along. Coffee, alcohol, and citrus are also common personal triggers, though they affect people to different degrees.
You don’t necessarily need to eliminate all of these permanently. Many people find relief by identifying their two or three worst triggers and reducing portion sizes rather than cutting foods out entirely.
Why Meal Timing Matters So Much
Stop eating at least three hours before you lie down. There’s a straightforward physical reason: when your stomach is full and you’re horizontal, gravity can no longer help keep acid where it belongs. Giving your stomach time to empty before bed is one of the most effective changes you can make for nighttime heartburn.
Eating smaller, more frequent meals rather than large ones also helps. A full stomach puts more pressure on the valve at the top, making reflux more likely. If you tend to get heartburn after dinner, try making lunch your largest meal instead.
How You Sleep Changes Everything
Sleeping on your left side significantly reduces reflux symptoms compared to sleeping on your right side. The anatomy explains why: when you lie on your right side, your esophagus sits below your stomach, essentially creating a downhill path for acid to flow into your throat. On your left side, the esophagus sits above the stomach, so gravity works in your favor.
Elevating the head of your bed also helps. This doesn’t mean stacking pillows, which can bend your body at the waist and actually worsen pressure on your stomach. Instead, place a foam wedge under your mattress or put six-inch risers under the legs at the head of your bed. The goal is a gentle, full-body incline.
Other Lifestyle Changes That Help
Excess weight around the midsection increases abdominal pressure, which pushes stomach contents upward. Even modest weight loss can noticeably reduce heartburn frequency. Tight clothing around the waist has the same mechanical effect on a smaller scale.
Smoking weakens the esophageal valve and increases acid production. Quitting is one of the more impactful changes for chronic heartburn sufferers. Alcohol relaxes the valve too, which is why heartburn often flares after drinking.
Does Ginger Actually Work?
Ginger has some evidence behind it, though the picture is mixed. It appears to increase the speed at which your stomach empties, which reduces the window for acid to reflux. One study found that 1,650 mg of ginger per day improved upper digestive symptoms including reflux. A daily dose of around 1,500 mg (split across the day) is the range that shows up most often in research, but study results have been inconsistent because trials used different preparations and doses.
Ginger tea or ginger chews are unlikely to cause harm, and some people find them genuinely helpful, especially for mild symptoms. But ginger is not a substitute for antacids or dietary changes when heartburn is frequent.
Risks of Long-Term Acid Suppression
PPIs are remarkably effective, which is part of the problem. Many people stay on them for months or years when they were designed for short courses. Prolonged use has been linked to several concerns: deficiencies in magnesium, iron, calcium, and vitamin B12 (because stomach acid is needed to absorb all of these nutrients properly), an increased risk of certain gut infections including C. difficile, and a higher rate of community-acquired pneumonia, likely because suppressing acid allows bacteria to colonize areas that would normally be sterile.
None of this means PPIs are dangerous when used appropriately. A two-week course for frequent heartburn is well within safe territory. The risks accumulate with months and years of continuous use, which is why it’s worth addressing the underlying causes rather than relying on acid suppression indefinitely.
Heartburn During Pregnancy
Heartburn affects a large percentage of pregnant women, especially in the third trimester, as the growing uterus pushes the stomach upward. Standard antacids containing aluminum, calcium, or magnesium are considered safe and are recommended as the first option. However, bicarbonate-based antacids (including baking soda) are not recommended during pregnancy due to risks of fluid overload.
If antacids aren’t enough, H2 blockers like famotidine have been studied in pregnant women without showing increased risk of birth defects, preterm delivery, or miscarriage. A meta-analysis of nearly 2,400 exposed pregnancies found no statistically significant difference in congenital malformations compared to unexposed pregnancies. Calcium carbonate antacids should be kept below 1.4 grams of elemental calcium per day, as higher doses have been associated with a rare condition called milk-alkali syndrome.
Signs That Heartburn Needs Medical Attention
Occasional heartburn after a heavy meal is normal. Heartburn that happens twice a week or more, persists despite lifestyle changes and OTC medications, or has been going on for years may indicate gastroesophageal reflux disease (GERD), which can damage the esophageal lining over time.
Certain symptoms alongside heartburn are red flags: difficulty swallowing, pain when swallowing, unintentional weight loss, vomiting, or the sensation that food is getting stuck in your chest or throat. These warrant a prompt medical evaluation, as they can signal narrowing of the esophagus or other conditions that need direct investigation.

