NSAIDs, or nonsteroidal anti-inflammatory drugs, are a class of medications that reduce pain, inflammation, and fever. They’re among the most widely used drugs in the world, available both over the counter and by prescription. The group includes familiar names like ibuprofen and naproxen as well as prescription options like diclofenac and celecoxib.
How NSAIDs Work
Your body produces substances called prostaglandins at the site of an injury or infection. Prostaglandins trigger inflammation, swelling, and pain, which are all part of the healing process but can also make you miserable. NSAIDs work by blocking the enzyme (cyclooxygenase, or COX) that your body needs to produce these prostaglandins in the first place.
There are two forms of this enzyme. COX-1 runs constantly and handles everyday housekeeping: protecting your stomach lining from acid, helping your kidneys maintain healthy blood flow, and allowing your blood to clot normally. COX-2, on the other hand, ramps up specifically during inflammation. It’s the one responsible for the pain and swelling you feel after a sprain, a dental procedure, or an arthritis flare. Most NSAIDs block both forms, which is why they relieve pain but can also cause stomach and kidney side effects.
Common Types of NSAIDs
NSAIDs fall into two broad categories based on which enzymes they target.
Non-Selective NSAIDs
These block both COX-1 and COX-2. The most common ones include:
- Ibuprofen (Advil, Motrin): available over the counter, typically taken every 4 to 6 hours for pain relief
- Naproxen (Aleve): also over the counter, lasts longer than ibuprofen, so it’s usually taken every 8 to 12 hours
- Aspirin: the oldest NSAID, also used in low doses for heart protection
- Diclofenac: available by prescription in oral form and over the counter as a topical gel for joint and soft-tissue pain
- Meloxicam, indomethacin, piroxicam, ketoprofen: all prescription-strength options your doctor may choose for specific conditions
COX-2 Selective NSAIDs
These target mainly the COX-2 enzyme, which means they reduce inflammation while largely sparing COX-1’s protective role in the stomach. Celecoxib (Celebrex) is the primary COX-2 selective NSAID still on the market. It’s typically prescribed for people who need long-term anti-inflammatory treatment but are at higher risk for stomach problems. Two earlier COX-2 drugs, rofecoxib and valdecoxib, were pulled from the market due to cardiovascular concerns.
Ibuprofen vs. Naproxen
These two over-the-counter NSAIDs are the ones most people reach for, and the main practical difference is how long they last. In a head-to-head study after oral surgery, ibuprofen provided roughly 6 hours of meaningful pain relief, while naproxen sodium lasted about 7 hours. Naproxen showed significantly better pain control between hours 8 and 12, making it a better choice when you want fewer doses per day or overnight coverage. Ibuprofen can take up to 2 hours to reach its peak blood levels, so don’t assume the first dose isn’t working if you don’t feel relief immediately.
For general pain relief, ibuprofen is typically dosed at 200 to 400 mg every 4 to 6 hours. Prescription doses for conditions like rheumatoid arthritis can go up to 3,200 mg per day, divided into three or four doses. Naproxen sodium is usually taken at 220 mg every 8 to 12 hours over the counter.
Stomach and Digestive Risks
Because non-selective NSAIDs also block COX-1, they reduce the prostaglandins that protect your stomach lining from its own acid. Over time, this can lead to stomach ulcers and, in serious cases, GI bleeding. The risk is strongly dose-dependent. At low doses of ibuprofen (under 1,200 mg per day), the odds of upper GI bleeding barely differ from taking no NSAID at all. But at higher doses (1,800 mg or more), the risk roughly quadruples. For stronger prescription NSAIDs like piroxicam, even standard doses carry a substantially higher bleeding risk.
In large population studies, the overall rate of hospitalization for GI complications among NSAID users lands between 1.3 and 2.2 events per 1,000 patient-years. That sounds low, but it adds up across millions of users. Among people over 60, the estimated rate of hospitalization for NSAID-related ulcer bleeding is about 0.4 per 100 patient-years. The risk climbs with age, higher doses, longer duration of use, and combining NSAIDs with alcohol, corticosteroids, or blood thinners (even low-dose aspirin). Taking a proton pump inhibitor alongside an NSAID can help offset some of this stomach risk.
Heart Attack and Stroke Risk
The FDA has strengthened its warning that all non-aspirin NSAIDs can increase the risk of heart attack or stroke. This applies to both over-the-counter and prescription versions, and the risk can begin within the first weeks of regular use. It’s higher with longer use and higher doses, though even short-term use carries some increase. People with existing heart disease face the greatest risk, but the warning applies to everyone. Aspirin is the exception here: it is not included in this cardiovascular warning and is, in fact, used at low doses specifically to protect the heart.
Effects on the Kidneys
Your kidneys rely on prostaglandins to keep blood flowing through them, especially when your body is under stress from dehydration, heart failure, or blood pressure changes. Prostaglandins widen the blood vessels feeding your kidneys, counteracting the constricting effects of stress hormones like adrenaline. When NSAIDs block prostaglandin production, that safety valve disappears, and kidney blood flow can drop significantly.
For most healthy, well-hydrated people, this isn’t a problem with short-term use. But if you’re dehydrated, elderly, or already have reduced kidney function, NSAIDs can push the kidneys toward acute injury. They also cause the kidneys to retain more sodium and water, which can raise blood pressure and counteract blood pressure medications. This is why NSAIDs can interact poorly with some antihypertensive drugs: the NSAID undermines the very mechanism the blood pressure pill is trying to use.
Drug Interactions to Watch For
NSAIDs don’t exist in isolation, and combining them with certain other medications raises your risk of side effects:
- Blood thinners and aspirin: Combining NSAIDs with anticoagulants or even low-dose aspirin (75 to 300 mg) increases bleeding risk, particularly in the GI tract.
- Blood pressure medications: NSAIDs can blunt the effectiveness of many antihypertensives by promoting sodium and water retention.
- Antidepressants: Certain antidepressants, particularly SSRIs, may compound the bleeding risk when taken alongside NSAIDs.
- Alcohol: Drinking while taking NSAIDs increases the chance of stomach irritation and bleeding.
Aspirin and Children
Aspirin carries a unique risk for children and teenagers. While less than 0.1% of children who take aspirin develop Reye syndrome, a rare but serious condition affecting the brain and liver, more than 80% of children diagnosed with Reye syndrome had taken aspirin in the preceding three weeks. The link was strong enough that public health authorities now advise against giving aspirin to anyone under 18 during viral illnesses. Ibuprofen and acetaminophen (which is not an NSAID) are considered safer alternatives for fever and pain in children.
Who Should Be Cautious
NSAIDs are safe and effective for most people when used at the lowest effective dose for the shortest time needed. But certain groups face higher risk: people over 60, those with a history of stomach ulcers or GI bleeding, anyone with kidney disease or heart failure, and people already taking blood thinners or corticosteroids. For these groups, a COX-2 selective NSAID like celecoxib, a topical NSAID like diclofenac gel (which delivers the drug locally with less systemic absorption), or an alternative pain reliever may be a better fit.

