Key takeaways:
Certain medications can irritate and erode the lining of the esophagus or stomach, leading to inflammation or ulcers. This can cause heartburn, chest pain, and difficulty swallowing.
Many of these medications — like doxycycline, clindamycin, and ibuprofen — have alternatives that may be gentler on the stomach.
If your medication is causing heartburn, there are things you can try. Examples include drinking a full glass of water when you take your medications and staying upright for 30 to 60 minutes after swallowing your pills.
Many people experience heartburn, chest pain, and indigestion. But fewer think that their medications might be the cause. Even so, many common prescription and over-the-counter (OTC) medications can directly harm the lining of the esophagus and stomach. This can lead to pill esophagitis — an irritation of the lining of the esophagus, caused by medication — and ulcers.
Below are the most common medications that cause heartburn, along with what you can do about it.
1. Doxycycline and other tetracyclines
Antibiotics — especially tetracyclines — are the most common cause of esophagitis. Tetracyclines are very acidic and directly irritate the esophagus and stomach lining, often causing pain within hours of taking it.
Doxycycline is one of the main culprits. It can even cause ulcers (sores) in the lining of the esophagus and stomach. One way to help minimize this is to take doxycycline and other tetracyclines with food.
2. Clindamycin
Clindamycin is another common antibiotic that can cause irritation and erosions in the esophagus. One small but revealing study examined people who reported pain with swallowing after taking clindamycin. All of them had visible esophageal ulcers when they were examined with endoscopy, a camera that looks inside the gastrointestinal (GI) system.
3. Aspirin
Many people take a daily aspirin for heart disease. It prevents platelets from clumping together, which can help prevent the type of blood clots that lead to strokes and heart attacks.
But aspirin also disrupts something called prostaglandins — molecules that help protect the gut lining. Prostaglandins travel all around the body and help heal injuries, like irritation of the esophagus. So aspirin can lead to both esophagitis and bleeding in the GI tract.
If you take a daily aspirin, check with your healthcare team to make sure you need it — and that you’re taking the lowest possible dose. Lower doses of aspirin carry a lower risk for esophagitis.
4. Ibuprofen and other NSAIDs
Nonsteroidal anti-inflammatory drugs (NSAIDs) — including ibuprofen (Motrin, Advil) and naproxen (Aleve) — also affect prostaglandins. They’re one of the common causes of ulcers in the esophagus and stomach. This can lead to symptoms like heartburn, stomach pain, or dark stool (if the ulcers are bleeding).
If you take NSAIDs and you’re having these symptoms, ask your healthcare team about switching to a different NSAID, like celecoxib (Celebrex). This NSAID works slightly differently, and it’s easier on the esophagus and stomach.
5. Bisphosphonates
Bisphosphonates are a class of medications that treat osteoporosis. Common examples include alendronate (Fosamax) and ibandronate (Boniva).
Bisphosphonates have a long history of leading to complications in the esophagus — including inflammation, irritation, and ulcers. They may also lead to narrowing of the esophagus (esophageal stricture).
Risedronate (Actonel) may have fewer GI side effects compared to alendronate. So it may be the safer option.
Given the risk of esophageal stricture, it’s important to contact your healthcare team right away if you experience:
Chest pain
New or worsening heartburn
Difficulty swallowing
A feeling that food is getting stuck
Pain with swallowing
6. Potassium supplements
Some people with low potassium levels need to take a supplement. This is usually either potassium chloride or potassium citrate. Both of them can irritate the esophagus and cause heartburn.
Solid forms, like capsules and tablets, are more likely to cause irritation. So, if this is an issue, talk to your healthcare team about switching to a liquid form of potassium.
7. Iron supplements
Ferrous sulfate — found in most OTC iron supplements — can cause direct injury to the esophagus. It’s similar to tetracyclines in this way. Ferrous sulfate becomes very acidic when it dissolves in saliva. This means it can injure the lining of the esophagus or stomach as it dissolves.
The good news is that there are options for iron supplementation that may be easier on the gut. This includes Pur-Absorb iron packets, Feosol natural release, or supplements containing ferrous fumarate.
8. Quinidine
Quinidine is an older medication that treats abnormal heart rhythms like atrial fibrillation (AFib). Like bisphosphonates, it can injure the esophagus and lead to a stricture. But the good news is that there are many alternative heart medications that are more common these days.
How to avoid heartburn from your medication
Heartburn typically improves within a few weeks after stopping the offending medication. But there are things that you can do to prevent or reduce the chances of it happening in the first place:
Don’t lie down right after taking these medications. Stand or sit upright for at least 30 to 60 minutes after taking them. And don’t take them before bed.
Drink enough fluids when you take your medication. Try to take your pills with at least half a cup of water (4 oz) instead of a small sip (1 oz). Ideally, you can take medications with a full cup of water (8 oz) to minimize the risk of pills getting stuck in the esophagus and causing damage.
Consider taking your medication with food. But talk to your pharmacist first, because some medications should be taken on an empty stomach.
Talk to your healthcare team about alternatives. Some medications may be available in different forms that are easier on the digestive tract and cause less irritation.
Treat minor heartburn symptoms. This includes OTC and home remedies, as well as avoiding trigger foods.
Taking OTC antacids can help, but some of these may interact with your medication. Your healthcare team may recommend a protective medication, like a proton pump inhibitor (PPI). PPIs block acid that can cause further irritation and prevent healing. Examples include omeprazole (Prilosec), pantoprazole (Protonix), and esomeprazole (Nexium).
Frequently asked questions
There are three main types of heartburn pills: antacids, H2 blockers, and proton pump inhibitors (PPIs). Each has their own risks and benefits. For occasional heartburn, antacids and H2 blockers typically work best. But if you have more frequent or long-term heartburn, PPIs might be the best and safest option for you.
Any medications in the list above can cause severe heartburn. But one of the most common offenders are tetracycline antibiotics, like doxycycline. This medication can cause severe heartburn within hours of taking it. On the other hand, nonsteroidal anti-inflammatory drugs (NSAIDs) can wear down your stomach lining over time. And this can also eventually lead to severe heartburn.
If you’re experiencing heartburn when you sleep, you should elevate your head and torso while sleeping. There are special wedge-based pillows that can help with this. Another option is to place the head of your bed on risers to create an incline.
You should also avoid:
Taking your medications right before bedtime
Large meals too close to bedtime
Alcohol
There are three main types of heartburn pills: antacids, H2 blockers, and proton pump inhibitors (PPIs). Each has their own risks and benefits. For occasional heartburn, antacids and H2 blockers typically work best. But if you have more frequent or long-term heartburn, PPIs might be the best and safest option for you.
Any medications in the list above can cause severe heartburn. But one of the most common offenders are tetracycline antibiotics, like doxycycline. This medication can cause severe heartburn within hours of taking it. On the other hand, nonsteroidal anti-inflammatory drugs (NSAIDs) can wear down your stomach lining over time. And this can also eventually lead to severe heartburn.
If you’re experiencing heartburn when you sleep, you should elevate your head and torso while sleeping. There are special wedge-based pillows that can help with this. Another option is to place the head of your bed on risers to create an incline.
You should also avoid:
Taking your medications right before bedtime
Large meals too close to bedtime
Alcohol
The bottom line
Heartburn and indigestion can be painful and disrupt important parts of your day, like sleeping and eating. But many people dismiss these symptoms as temporary upset. If you’re experiencing heartburn, don’t ignore it. It may be caused by one of your medications, which can cause damage to the lining of your esophagus and stomach. And there may be alternative treatments that will protect your gastrointestinal (GI) tract and help reduce your symptoms.
Why trust our experts?


References
Bestari, M. B., et al. (2019). Clindamycin-induced esophageal injury: Is it an underdiagnosed entity? Clinical Medicine Insights.
Fan, Z., et al. (2024). From pill to pain: Alendronate-induced esophageal injury—A case report and review. JGH Open.
Mission Pharmacal Company. (2009). Urocit-K (potassium citrate) extended-release tablets for oral use [package insert].
Saleem, F., et al. (2023). Drug induced esophagitis. StatPearls.
Scheiman, J. M. (2013). The use of proton pump inhibitors in treating and preventing NSAID-induced mucosal damage. Arthritis Research & Therapy.
Upsher-Smith Laboratories, LLC. (2020). KLOR-CON- potassium chloride tablet, film coated, extended release [package insert].













