How to Treat Heartburn With Meds

Medically Reviewed by Jennifer Robinson, MD on April 18, 2022
5 min read

The acid that helps digest food is very strong. But while your stomach can handle it, the more sensitive esophagus can’t.

Stomach acid is supposed to stay in your stomach. But if a faulty valve at the top of your stomach is leaky, acid can wash (or “reflux”) up, causing a burning sensation called heartburn, which has nothing to do with your heart.

Ideally, you can reduce reflux symptoms simply by losing weight or changing your habits-like not lying down within 2 hours of eating.While you are struggling with symptoms, there are medications you can take. But if changing your habits doesn’t bring relief, there are plenty of over-the-counter and prescription medicines that can help cool the burn.

Before you choose one, get to know the options. And keep in mind that sometimes what you think is heartburn is something else. So before you start any heartburn treatment, it’s best to see a doctor to rule out other issues.

The oldest and best-known medicines for treating heartburn, they have remained popular because they’re fast-acting, inexpensive, available without a prescription, and are safe for most people when used as directed. Maalox, Mylanta, Rolaids, and Tums are examples.

How do they work? Antacids neutralize acids in the stomach (think: anti-acid). You can take them to treat heartburn that has already started. If you ate a spicy dinner and have heartburn symptoms, antacids are probably your best bet to put out that fire.

Some are tablets. Others are sold as liquids. Tablets take longer to act and aren’t as strong as the liquid, but many people find the tablets to be more convenient. For faster relief, chew them well before swallowing.

How soon do they take effect? They can start to ease your symptoms in as little as 5 minutes. The relief may last as little as half an hour or as long as 3 hours.. Antacids won’t prevent future bouts of heartburn or heal any damage in your esophagus.

Side effects: Your side effects may depend on how much you take and how often you take them. If you only take them every now and then, you may not have any. But some people who use antacids may get diarrhea or constipation. If you have heart or kidney problems, you should talk to your doctor before taking them.

The bottom line: If your heartburn is mild and due to something you ate, an antacid is probably your best option. It will work quickly and there’s little downside. But if your heartburn is more severe, or it happens more than twice a week, you may need a stronger medicine.

If antacids don’t help enough, you may want to consider a histamine blocker (H2 blocker). H2 blockers like cimetidine (Tagamet), famotidine (Pepcid), and nizatidine are available in liquids and tablets, both over-the-counter and by prescription.

How do they work? These drugs tell your stomach to make less acid, so you are less likely to get heartburn.

If you tend to get heartburn in certain situations, like when you eat spicy food, taking an H2 blocker an hour before your meal can help ward off symptoms. When taken before bed, they can help with nighttime heartburn.

How soon do they take effect? Usually, they start to work in an hour and the results last for up to 12 hours. One medicine, Pepcid Complete, combines two antacids (calcium carbonate and magnesium hydroxide) with an H2 blocker (famotidine) for both immediate and longer-term relief.

H2 blockers are not always effective against chronic heartburn caused by gastroesophageal reflux disease (GERD).

You can take over-the-counter H2 blockers for up to 2 weeks for short-term help. If you have used over-the-counter medicines to treat your symptoms for longer than that, talk to your doctor.

Side effects can include diarrhea, constipation, dizziness, and sleepiness.

The bottom line: H2 blockers can be an effective treatment against moderate cases of heartburn. One of their advantages is that they can be taken as needed and don't need to be taken daily to work. You can also take them before a meal to help prevent symptoms. But if you have a severe case or your symptoms are not relieved after two weeks of twice daily H2 blockers, you'll likely need a stronger medication.

If antacids and H2 blockers don’t give you enough relief, or if you have heartburn often or your reflux is severe, you may want to try another type of drug called a proton pump inhibitor (PPI).

PPIs include over-the-counter and prescription pills and tablets. No formulation has been shown to be better than any other, but you may find one that is more effective for your symptoms.

Over-the-counter medications include esomeprazole (Nexium), lansoprazole (Prevacid), omeprazole (Prilosec), and omeprazole/sodium bicarbonate (Zegerid).

Medications that your doctor can prescribe include dexlansoprazole (Dexilant), esomeprazole (Nexium), lansoprazole (Prevacid), omeprazole (Prilosec), omeprazole/sodium bicarbonate (Zegerid), pantoprazole (Protonix), and rabeprazole (Aciphex).

How do they work? In your stomach, millions of tiny pumps make acid to break down food. PPIs turn off some of these pumps. The result is less stomach acid. PPIs are the only GERD medication that can heal an inflamed esophagus or an ulcer.

How soon do they take effect? Some people expect PPIs to help right away. But they can take up to 4 days to start working. Unlike H2 blockers, PPIs are meant to be taken every day for at least 2 weeks. Sometimes your doctor might prescribe a 4- to 8-week course, and some patients find they need them indefinitely. All of the PPIs work best when taken on an empty stomach 30 minutes prior to breakfast.

Side effects: There are number of potential side effects from taking PPIs long term, but study data is weak There is a concern for diarrheal infections and pneumonia. The low acid state can affect the absorption of multiple vitamins and minerals, leading to low iron, magnesium, calcium, and vitamin B12 levels. Low bone density leading to an increased fracture risk, such as breaking a hip, is also a concern..

When you suddenly stop taking PPIs, your body may produce an overabundance of acid before settling back down to its normal. It may take up to two weeks before your body returns to its normal. It is best to gradually stop the use of PPIs.

The bottom line: These medications can help get heartburn under control, but if you find yourself taking them often because your symptoms are severe or keep coming back, then it’s time to talk to your doctor.