Why Does My Stomach Hurt When I Swallow Food?

Pain in your stomach area when you swallow food usually means something is irritating or inflaming your esophagus (the tube connecting your throat to your stomach) or your stomach lining itself. The sensation can range from a dull ache to a sharp, burning stab, and the cause is often treatable once identified. Several common conditions explain this symptom, and the location and timing of the pain offer strong clues about what’s going on.

Acid Reflux and GERD

The most common reason food triggers stomach-area pain is gastroesophageal reflux disease, or GERD. Normally, a muscular valve at the bottom of your esophagus closes after food passes through. When that valve doesn’t seal properly, stomach acid flows backward into the esophagus. Acid literally burns the esophageal tissue, so when food travels down and contacts that already-damaged lining, it hurts. The pain often feels like burning behind your breastbone, and it can radiate into your chest or back in a way that mimics heart-related pain. You might also notice a lump-in-the-throat sensation or feel like food is getting stuck.

Over time, repeated acid exposure inflames the esophagus, a condition called esophagitis. Once that inflammation is established, every swallow of food or drink can aggravate it. Spicy foods, acidic drinks, alcohol, and large meals tend to make it worse.

Stomach Ulcers and Gastritis

If the pain hits once food actually reaches your stomach, rather than while it’s still going down, the problem may be in the stomach lining itself. Peptic ulcers are open sores on the inner surface of the stomach (or the upper part of the small intestine), and they produce a dull or burning pain that, for some people, flares specifically after eating. For others, the pain is worse on an empty stomach, between meals or at night.

Most ulcers are caused by a bacterial infection called H. pylori or by long-term use of common painkillers like ibuprofen and aspirin. The bacteria trigger inflammation that erodes the stomach’s protective lining. When food lands on an exposed ulcer, it’s similar to pressing on a wound. Gastritis, which is inflammation of the stomach lining without a full ulcer, produces a similar pattern of pain after eating.

Hiatal Hernia

Your esophagus passes through a small opening in the diaphragm, the large muscle separating your chest from your abdomen, before connecting to your stomach. A hiatal hernia occurs when the upper part of the stomach pushes up through that opening into the chest cavity. Small hiatal hernias often cause no symptoms at all, but larger ones can cause heartburn, acid reflux, trouble swallowing, chest or abdominal pain, and a feeling of fullness very soon after you start eating.

Because the stomach is partly in the wrong position, food passing through the junction can trigger discomfort. A hiatal hernia also makes acid reflux worse, compounding the problem.

Medication-Related Irritation

Certain pills can damage the esophageal lining on their way down, especially if you swallow them without enough water or lie down right afterward. This is called pill-induced esophagitis, and it creates sore spots that flare every time you swallow food.

The most common culprits include:

  • Antibiotics, particularly doxycycline, clindamycin, and amoxicillin
  • Over-the-counter painkillers like aspirin and ibuprofen
  • Osteoporosis medications such as alendronate
  • Iron supplements and potassium supplements
  • Vitamin C in large doses

If your swallowing pain started shortly after beginning a new medication, that’s a strong clue. Taking pills with a full glass of water and staying upright for at least 30 minutes afterward can prevent this type of injury.

Eosinophilic Esophagitis

This is a less obvious cause but an increasingly common one. Eosinophilic esophagitis (EoE) is a chronic allergic condition where a type of white blood cell builds up in the esophageal lining, causing inflammation and narrowing. It affects roughly 1 in 700 people in the United States, and its prevalence has increased fivefold since 2009. It’s more common in men, with peak prevalence between ages 40 and 44.

In adults, EoE typically causes difficulty swallowing and the sensation of food getting stuck. In children, it more often shows up as abdominal pain, vomiting, and poor weight gain. The condition is diagnosed through an upper endoscopy with biopsies, since the esophagus may look relatively normal to the naked eye. Food allergies, particularly to dairy, wheat, eggs, and soy, are the most common triggers.

How the Pain Location Helps

Where exactly the pain starts matters. If it’s in your throat or upper chest as you’re actively swallowing, the issue is likely in the esophagus: reflux damage, pill irritation, or EoE. If the pain arrives a few seconds after swallowing, once the food has reached your stomach, ulcers or gastritis are more likely. Pain that radiates to your back or feels like a deep, stabbing sensation can indicate more significant esophageal inflammation or, less commonly, a structural problem.

Temperature and texture of food also provide clues. If hot liquids or rough, dry foods make the pain worse, you’re likely dealing with an irritated or eroded lining somewhere along the path. If only solid foods trigger it while liquids go down fine, narrowing of the esophagus from scarring, EoE, or a structural issue is a possibility.

What Happens During Diagnosis

If swallowing pain persists for more than a week or two, a doctor will typically start with an upper endoscopy: a thin, flexible camera passed through the mouth to visually inspect the esophagus, stomach, and upper intestine. This single test can identify ulcers, inflammation, hernias, narrowing, and signs of EoE. Biopsies taken during the procedure can confirm EoE or rule out other conditions.

If the endoscopy looks normal, a barium swallow study (where you drink a chalky liquid and get X-rayed) can reveal motility problems or subtle structural issues. In some cases, pH monitoring, which tracks acid levels in the esophagus over 24 to 48 hours, is used to confirm reflux that isn’t visible on a scope.

Warning Signs That Need Prompt Attention

Most causes of swallowing pain are manageable, but certain symptoms suggest something more serious. Unintentional weight loss is the biggest red flag, particularly if you’re losing weight because eating has become too painful. Difficulty opening your mouth, pain that progressively worsens over weeks, vomiting blood or passing dark stools, and complete inability to swallow liquids all warrant urgent evaluation. These can point to severe ulceration, significant esophageal narrowing, or, rarely, a growth in the esophagus or stomach.