Why Do NSAIDs Cause Ulcers and How to Reduce Risk

NSAIDs cause ulcers by blocking the production of protective substances your stomach depends on to shield itself from its own acid. Every time you take ibuprofen, naproxen, or a similar painkiller, you’re suppressing the very compounds that keep your stomach lining intact. About 70% of people who take NSAIDs long-term develop visible damage to their stomach lining, even though only about 10% of them feel any symptoms.

How Your Stomach Normally Protects Itself

Your stomach produces hydrochloric acid strong enough to break down food, yet the stomach wall doesn’t dissolve. That’s because of a defense system built on compounds called prostaglandins, which are made by an enzyme called COX-1. Prostaglandins do three critical things: they stimulate cells to secrete a thick layer of mucus over the stomach lining, they trigger the release of bicarbonate (a natural acid neutralizer) into that mucus layer, and they maintain strong blood flow to the stomach wall so damaged cells can be quickly replaced.

Together, these defenses create a pH gradient at the surface of the stomach. The acid in the open stomach cavity can be extremely low pH, while the thin zone right at the lining surface stays close to neutral. This gradient is what keeps your stomach from digesting itself.

What NSAIDs Do to That Defense System

NSAIDs work by blocking the COX enzymes. There are two main types: COX-1, which maintains everyday protective functions like stomach lining integrity, and COX-2, which ramps up during injury and drives pain and inflammation. Traditional NSAIDs like ibuprofen, naproxen, and aspirin block both.

When COX-1 is shut down, prostaglandin production drops sharply. Without adequate prostaglandins, mucus secretion decreases, bicarbonate output falls, and blood flow to the stomach wall slows. The protective pH gradient at the lining surface weakens, leaving the cells directly exposed to stomach acid. At the same time, reduced blood flow means the stomach can’t repair minor damage as efficiently. Small erosions that would normally heal within hours can deepen into ulcers.

This is a systemic effect, meaning it happens regardless of how the drug enters your body. Even NSAIDs given by injection or absorbed through the skin still suppress prostaglandin production throughout your system, including in the stomach.

Direct Chemical Irritation

On top of the systemic effect, most oral NSAIDs also cause direct, local damage when they contact the stomach lining. These drugs are weakly acidic molecules. In the highly acidic environment of the stomach, they remain in a form that can cross into the cells of the stomach wall. Once inside those cells, where the pH is closer to neutral, they become trapped and accumulate, disrupting the cells from within.

This topical injury irritates the gastric lining, contributes to erosions, and compounds the damage already being caused by the loss of prostaglandin protection. The combination of these two mechanisms, systemic prostaglandin suppression plus direct chemical irritation, is what makes oral NSAIDs particularly hard on the stomach.

How Much Risk NSAIDs Actually Add

Regular NSAID users face roughly a fivefold increase in the risk of developing peptic ulcer disease and a fourfold increase in the risk of upper GI bleeding compared to people who don’t take these drugs. A third of people taking NSAIDs regularly develop symptoms like stomach discomfort, bloating, nausea, or heartburn. But symptoms are an unreliable guide: 70% of long-term users show erosions, ulcers, or bleeding on endoscopy, while many of them feel nothing at all.

Not all NSAIDs carry the same level of risk. In one large study of confirmed upper GI bleeding cases, ketorolac (a potent prescription NSAID) carried the highest risk at about 14 times that of non-users. Milder options like aceclofenac had a risk increase closer to 2.6 times.

Why COX-2 Selective NSAIDs Are Easier on the Stomach

COX-2 selective inhibitors, such as celecoxib, were designed to block COX-2 (the pain and inflammation enzyme) while leaving COX-1 (the stomach-protection enzyme) largely alone. The result is a meaningful reduction in gut damage. In a systematic review of clinical trials, COX-2 selective drugs produced 74% fewer stomach and duodenal ulcers and 61% fewer serious ulcer complications compared to traditional NSAIDs.

In the same case-control study that found ketorolac carried a 14-fold bleeding risk, celecoxib showed no statistically significant increase in ulcer bleeding risk at all compared to people not taking any NSAID. This doesn’t make COX-2 inhibitors completely safe for the stomach, but the difference is substantial.

Factors That Raise Your Risk Further

The baseline risk from NSAIDs can be amplified by several factors. Age is one of the strongest: people 65 and older face significantly higher rates of GI complications, and the risk climbs further past age 70. A history of peptic ulcer disease is another major predictor, as is the dose and type of NSAID being used.

Certain drug combinations make things considerably worse. Taking an NSAID alongside an antidepressant from the SSRI class (like sertraline or fluoxetine) increases the odds of upper GI bleeding by about 75% beyond the NSAID risk alone. SSRIs affect platelet function, reducing the blood’s ability to form clots and seal small wounds in the stomach lining. Anticoagulants (blood thinners) and corticosteroids also raise the risk when combined with NSAIDs, though precise risk multipliers for those combinations are harder to pin down from available data.

The Role of H. Pylori Infection

H. pylori, a bacterium that colonizes the stomach lining in roughly half the world’s population, damages the stomach through its own set of mechanisms: reducing blood flow to the mucosa, triggering local inflammation, and promoting cell death. When someone with an H. pylori infection also takes NSAIDs, the two insults compound each other. The NSAID strips away the prostaglandin-driven defenses while the bacterium weakens the lining from the other side, creating an environment where ulcers form more readily than either factor would cause alone.

The interaction isn’t perfectly understood, but it likely involves changes in mucus quality, shifts in stomach acid levels driven by the pattern of H. pylori-related inflammation, and a generally more vulnerable mucosal surface. For people who need long-term NSAID therapy, testing for and treating H. pylori infection is one strategy to lower the combined risk.

Reducing the Damage

If you need to take NSAIDs regularly, the most common protective strategy is co-prescribing a proton pump inhibitor (PPI), which dramatically reduces stomach acid output and gives the lining a better chance of holding up. Using the lowest effective NSAID dose for the shortest possible time also matters. Switching to a COX-2 selective option, when appropriate, removes a large share of the stomach risk. And avoiding stacking NSAIDs with SSRIs, corticosteroids, or blood thinners, when alternatives exist, eliminates some of the most dangerous drug interactions.

For people with a history of ulcers who still require anti-inflammatory treatment, the combination of a COX-2 selective NSAID plus a PPI offers the most stomach protection currently available.