Heartburn happens when stomach acid flows backward into your esophagus, the tube connecting your mouth to your stomach. About 14% of the global population experiences this at least once a week. The burning sensation you feel isn’t actually in your heart. It’s acid irritating the lining of your esophagus, which lacks the protective coating your stomach has.
How Acid Ends Up in Your Esophagus
At the bottom of your esophagus sits a ring of muscle that acts like a one-way valve. It opens to let food drop into your stomach, then closes to keep everything down. This valve relaxes within about two seconds of swallowing and stays open for six to ten seconds before tightening again.
Heartburn occurs when this valve relaxes at the wrong time or doesn’t close tightly enough. Your stomach naturally stretches after a meal, and that stretching can trigger brief, spontaneous openings of the valve that have nothing to do with swallowing. When the valve opens this way, stomach acid, digestive enzymes, and bile salts can wash upward and damage the esophageal lining. That’s the burn you feel.
Foods and Drinks That Trigger It
Certain foods directly weaken the valve between your stomach and esophagus. High-fat meals, chocolate, alcohol, and carbonated beverages all reduce the pressure that keeps the valve shut, giving acid an easier path upward. Mint has a similar relaxing effect on the muscle.
Other foods don’t weaken the valve but irritate the esophagus on contact. Citrus fruits, tomatoes, onions, garlic, and spicy foods fall into this category. Caffeinated beverages, including coffee and tea, are also common culprits. Fast food and oily dishes combine multiple triggers at once: high fat content to loosen the valve plus ingredients that irritate the lining.
Carbonated drinks deserve special mention because they do double duty. The carbonation increases pressure inside your stomach, which forces the valve open, while the acidity in many sodas adds direct irritation.
Habits That Make It Worse
Lying down after eating is one of the most reliable ways to trigger heartburn. When you’re upright, gravity helps keep stomach contents where they belong. Lying down removes that advantage. If you do lie down after a meal, your position matters: sleeping on your right side roughly doubles the total time acid stays in contact with your esophagus compared to lying on your left side. Acid also takes significantly longer to clear when you’re on your right side (about 0.77 minutes per episode versus 0.29 minutes on the left).
Eating large meals stretches your stomach more, which triggers more spontaneous valve openings. Eating close to bedtime compounds this by combining a full stomach with a horizontal position. Smoking weakens the esophageal valve over time. Tight clothing or belts that press on your abdomen can physically push stomach contents upward.
Medications That Cause Heartburn
Several common medications can trigger heartburn through two different routes. Some weaken the esophageal valve directly, while others irritate the esophagus on the way down.
- Pain relievers (NSAIDs): Ibuprofen, aspirin, and naproxen reduce the protective lining of your digestive tract and have acidic properties that can injure tissue on contact.
- Blood pressure medications: Calcium channel blockers like amlodipine relax the esophageal valve, allowing acid to escape upward. Nitrate medications work through a similar mechanism.
- Antibiotics: Doxycycline and certain other antibiotics can directly irritate the esophagus, especially if swallowed without enough water or right before lying down.
- Osteoporosis drugs: Bisphosphonates like alendronate are known to irritate the upper digestive tract and can cause significant esophageal inflammation.
- Blood thinners: Some newer oral anticoagulants contain acidic coatings that can injure the esophageal lining on contact.
If you notice heartburn starting or worsening after beginning a new medication, that connection is worth raising with your prescriber.
Pregnancy and Heartburn
Heartburn during pregnancy results from a combination of hormonal and physical changes. Hormonal shifts slow your digestive system, meaning food sits in your stomach longer and produces more acid. These same hormones relax smooth muscle throughout your body, including the valve at the top of your stomach.
As pregnancy progresses, the growing uterus presses directly against the stomach, physically forcing contents upward. This is why heartburn typically worsens in the third trimester, when the uterus is largest, and episodes become both more frequent and more painful as the due date approaches.
When a Structural Problem Is Involved
A hiatal hernia occurs when part of your stomach pushes upward through the diaphragm, the sheet of muscle separating your chest from your abdomen. This is the most common structural cause of chronic heartburn, and over 90% of hiatal hernias are the “sliding” type, where the junction between the esophagus and stomach slides above the diaphragm. When this happens, the diaphragm can no longer help the esophageal valve stay shut, so acid refluxes more easily.
Hiatal hernias are typically diagnosed through a barium swallow X-ray, where you drink a chalky liquid that shows up on imaging, or through an upper endoscopy, where a thin camera is passed down your throat. Many people have small hiatal hernias without knowing it. The hernia itself isn’t always a problem, but it can make reflux significantly harder to control.
Heartburn vs. Heart Attack
Heartburn and heart attacks can feel remarkably similar, and even experienced doctors sometimes can’t tell them apart from symptoms alone. Heartburn typically produces a burning sensation in the chest that starts after eating, worsens when lying down or bending over, responds to antacids, and may come with a sour taste in your mouth or a small amount of liquid rising into your throat.
Heart attack pain tends to feel more like pressure, tightness, or squeezing in the chest or arms, often spreading to the neck, jaw, or back. It may come with shortness of breath, cold sweat, sudden dizziness, or unusual fatigue. Women are more likely to experience the less “textbook” symptoms like jaw pain, back pain, and nausea. If you’re unsure whether your chest pain is heartburn or something cardiac, treat it as a heart attack until proven otherwise.
When Heartburn Becomes a Bigger Problem
Occasional heartburn after a spicy meal or a late dinner is common and not inherently dangerous. But when acid repeatedly washes over the same tissue, it causes cumulative damage. If you’ve had regular heartburn, regurgitation, and acid reflux for more than five years, the chronic acid exposure can cause the cells lining your lower esophagus to change into a different type of tissue, a condition called Barrett’s esophagus. This transformation is the body’s attempt to protect itself from the acid, but the new tissue carries a small risk of eventually becoming cancerous.
Persistent heartburn that doesn’t respond to dietary changes or over-the-counter treatments, difficulty swallowing, unintentional weight loss, or vomiting blood are all signs that something beyond simple reflux may be going on.

