NSAIDs and the gut

Hussain Abdeh, Pharmacist
Written by Hussain Abdeh, MPharm Published 28 August 2026
Sonia Khan, Pharmacist
Medically reviewed by Sonia Khan, Pharmacist Last reviewed 27 August 2026

Anti-inflammatory painkillers reduce the chemicals that protect your stomach lining, which is why ibuprofen, naproxen and aspirin can all cause irritation, indigestion and, in some people, ulcers. Less well known is what happens further down. The same drugs also affect the small intestine and the bacteria living in your gut, and stomach protection does not cover that part. Most people who take an occasional tablet for a headache or a sore back never notice any of it. The risk sits with higher doses, longer use, and a handful of situations that make the gut more vulnerable, such as being over 65, having had an ulcer before, or taking certain other medicines at the same time.

Which painkillers are NSAIDs?

NSAID stands for non-steroidal anti-inflammatory drug. In the UK the ones you are most likely to come across are ibuprofen, naproxen, diclofenac, aspirin and celecoxib. Ibuprofen and low-dose aspirin can be bought over the counter, and naproxen, diclofenac and celecoxib are usually prescribed.

They all work the same way. They block enzymes called COX-1 and COX-2, which the body uses to make prostaglandins. Prostaglandins drive pain and inflammation, so blocking them relieves pain. Prostaglandins also protect the stomach by limiting acid, keeping up the mucus layer and maintaining blood flow to the lining, so the same block that eases your knee also removes some of the stomach's defences.

Paracetamol is not an NSAID and does not work this way, which is why it is usually gentler on the stomach and often the first suggestion for mild pain. It is not interchangeable with an NSAID for every problem, and swapping between painkillers is a conversation to have with a pharmacist rather than a decision to make from an article.

Low-dose aspirin sits in a category of its own. When it is prescribed for the heart or after a stroke it is doing a different job at a much lower dose, and the balance of benefit and risk has already been weighed by the prescriber. Nothing in this guide is a reason to stop taking it.

What do NSAIDs do to the stomach lining?

With less prostaglandin protection, stomach acid can inflame and erode the lining. That produces the familiar complaints of heartburn, upper abdominal pain, nausea and indigestion, and with regular use it can produce peptic ulcers, meaning open sores in the stomach lining or the first part of the small intestine. Ulcers can bleed, and bleeding is the complication that makes this more than a comfort issue. Our guide to stomach ulcers and what causes them covers that in more detail.

Some people get symptoms and no damage. Others have damage and no symptoms until it bleeds, which is why the red flags at the foot of this page matter more than how your stomach feels day to day.

This part of the picture is well established rather than emerging. It is the reason UK prescribers often add a stomach-protecting medicine, usually a proton pump inhibitor such as omeprazole or lansoprazole, for people taking regular NSAIDs who have extra risk factors. If that is you, keep taking both as prescribed. We cover the specific naproxen and omeprazole combination in our guide to protecting your stomach and gut when taking naproxen.

Do NSAIDs affect the small intestine too?

They do, and the damage there happens by a different route. Beyond blocking prostaglandins, NSAIDs interact with the fatty layer coating the gut lining and interfere with the way gut cells produce energy. A 2017 review in Gastroenterology led by researchers at King's College Hospital in London set out how those effects raise the amount that passes through the gut wall and set off low-grade inflammation in the small intestine, separately from anything happening in the stomach.

How common is that? A capsule endoscopy study, where people swallow a camera the size of a large tablet, looked at 41 people: 21 who took NSAIDs daily for at least three months, and 20 who did not. Visible injury to the small intestine was found in 71% of the regular users and 10% of the comparison group. That is a small study from a single centre and the participants were mostly men with arthritis, so the percentage should not be read as a national figure. It is enough to show the effect is common rather than rare in people who take these drugs every day.

Most of that injury causes no symptoms at all. Where it shows up, it is often indirectly, as unexplained iron-deficiency anaemia found on a blood test. The researchers behind that study were clear that they could not say what the visible lesions meant for long-term health, and that remains an honest limit on the evidence.

Stomach protection does not solve this. Proton pump inhibitors work by cutting acid production, and there is very little acid in the small intestine to cut. A review of the mechanisms behind NSAID damage further down the gut argues that reducing stomach acid shifts the balance of gut bacteria in ways that may make small intestinal damage more likely rather than less. That is a reason to look after the wider gut, not a reason to stop a prescribed medicine, and we cover the trade-offs in our guide to how proton pump inhibitors affect the gut microbiome. This is also where the idea of NSAIDs and what the research actually says about leaky gut comes from, though the leap from a measurable change in the gut wall to a named illness is a much longer one than most pages admit.

Do NSAIDs change your gut bacteria?

The evidence here is real, and thinner than the evidence about ulcers.

A study of 155 American adults compared stool samples against what people had taken in the previous 30 days. The mix of bacteria differed by which drug had been taken, not simply by how many drugs. Aspirin users could be told apart from people taking no medication by the levels of four groups of bacteria. Ibuprofen and celecoxib users shared a similar pattern to each other, and it differed from the pattern in naproxen users. People taking an NSAID alongside a proton pump inhibitor looked different again from people on an NSAID alone. That was a snapshot of people who had chosen or been prescribed those medicines, so it shows a consistent association rather than proof that the drug caused the difference.

One trial has tested it directly. Fifty healthy volunteers aged 50 to 75 were randomly assigned to take either 325 mg of aspirin daily or a placebo for six weeks, giving stool samples over 12 weeks. The aspirin group's overall bacterial make-up shifted compared with placebo, with several groups of bacteria rising and others falling. The authors called it a pilot study and said the findings need replication in a larger trial, which is the right weight to give it.

A systematic review of the four most widely prescribed non-antibiotic drug groups, including NSAIDs, reached a similar position. There are recognisable patterns, and the field cannot yet describe a reliable signature for each drug. So the fair summary is that NSAIDs are associated with changes in the mix of gut bacteria, that the direction of those changes differs between drugs, and that nobody can currently tell you what your own result would look like or what it would mean for your health. If you want the wider picture, we cover the signs of an imbalance in your gut bacteria separately.

Which NSAIDs are hardest on the gut?

They are not equivalent. A meta-analysis of 28 observational studies, run as part of a European research project on NSAID safety, compared the risk of serious upper gut complications such as bleeding ulcers against not taking an NSAID at all. Celecoxib and ibuprofen came out lowest, at roughly one and a half to two times the background risk. Diclofenac sat around three times, naproxen around four times, and piroxicam higher still. High daily doses carried two to three times the risk of low daily doses of the same drug.

Two things follow from that. The first is that dose and duration matter at least as much as which drug you take. The second is that these are relative numbers. Doubling or quadrupling a small risk still leaves a small risk for most healthy adults taking a short course, which is why ibuprofen is sold over the counter at all.

Route matters too. NSAID gels and creams applied to the skin are absorbed into the bloodstream far less than tablets, and reviews of their use in knee and hand osteoarthritis report fewer side effects for similar pain relief, which is why UK guidance suggests them ahead of tablets for some joint pain. If you take tablets mainly for one painful joint, a gel is worth asking your pharmacist about.

Low-dose aspirin taken long term for the heart has been followed for longer than most. In one Japanese trial of 2,535 people with type 2 diabetes, tracked for a median of 11 years, upper gut symptoms or bleeding occurred in 8.8% of the aspirin group against 5.7% of those not taking it. Almost all of the extra risk appeared in the first three years, and enteric-coated tablets fared better than buffered ones. That was an additional analysis done after the main trial finished, in one country and one patient group, so treat it as a useful signal rather than a settled figure.

Who is most at risk of gut problems from NSAIDs?

Risk is not spread evenly, and knowing which group you are in is what makes the conversation with your GP or pharmacist useful. The situations that raise it are:

  • Being over 65, and more so over 75
  • A previous stomach ulcer or a previous gut bleed, which is the single strongest factor
  • Taking an NSAID daily rather than occasionally, or taking a higher dose
  • Taking two NSAIDs at once, which is easy to do by accident when one is a cold and flu remedy or a pharmacy painkiller you did not think of as an anti-inflammatory
  • Taking a steroid tablet, a blood thinner or an antiplatelet medicine alongside
  • Taking an SSRI antidepressant. A meta-analysis of ten studies found the odds of an upper gut bleed were about 75% higher in people taking an SSRI alongside an NSAID than in people taking an NSAID alone
  • Carrying Helicobacter pylori, a stomach bacterium that causes ulcers in its own right
  • Drinking heavily, or smoking

The H. pylori point has recently been tested at scale in the UK. In a trial run through UK general practice, 30,166 people over 60 who were taking aspirin had a breath test, and the 5,352 who tested positive were randomly assigned to a week of treatment to clear the bacterium or to placebo, then followed for around five years. Clearing it reduced ulcer bleeding in the first two and a half years, and the benefit was not sustained beyond that. The researchers concluded that testing everyone on aspirin would not be a good use of NHS money, while confirming that the two problems compound each other in individuals. If you have had an ulcer or a positive H. pylori test in the past, that is worth mentioning whenever an anti-inflammatory is suggested.

Can a test show what NSAIDs have done to your gut?

Partly. Damage to the stomach or small intestine is seen by a camera, arranged by a GP or hospital team, not by anything you can do at home. A stool test cannot look at your stomach lining.

What a stool test can show is the make-up of the bacteria in your gut at the moment you take the sample. That includes the overall variety of species present and the levels of individual groups, including the fibre-fermenting bacteria that produce butyrate, the compound that fuels the cells lining your colon. If you have been taking anti-inflammatories daily for years and want to see where your gut bacteria stand, a gut microbiome test measures a wide range of gut bacteria from a single sample posted from home.

It is a snapshot, not a verdict. It cannot tell you whether an NSAID caused what it finds, it does not diagnose any condition, and it is not a substitute for seeing a doctor about a symptom. What it gives you is something specific to discuss with a clinician, and a starting point for diet changes, instead of guesswork. If you are weighing that up, our page on gut microbiome testing for a gut imbalance explains what the results do and do not cover.

How can you take an NSAID more safely?

The first rule overrides everything else on this page. If an NSAID has been prescribed for you, take it as prescribed, and do not stop, reduce or space out doses because of something you have read. Uncontrolled pain and untreated inflammation carry their own costs, and if you are on low-dose aspirin for your heart, stopping it without advice carries a risk far greater than an upset stomach. Where a medicine is causing you problems, the answer is a conversation with the prescriber, not a decision made at home.

Within that, a few things are worth doing:

  • Take tablets with or just after food, which reduces irritation of the stomach lining
  • Use the lowest dose that controls the pain, for the shortest time that works. For short-term pain that means stopping when the pain stops rather than finishing the box
  • Check you are not doubling up. Read the ingredients of any cold and flu remedy, period pain product or combination painkiller before adding it to an NSAID you already take
  • Ask about a gel or cream if the pain is in one joint
  • Tell your pharmacist about everything else you take, including antidepressants, blood thinners, steroids and supplements
  • If you take an NSAID most days, ask your GP whether you should be on stomach protection, and ask for the reason to be reviewed periodically rather than left running indefinitely

Antibiotics are the other everyday medicine group with a measurable effect on gut bacteria, and we cover them separately in our guide to what antibiotics do to the gut microbiome.

Does diet or a supplement help?

For the gut bacteria side, the general principles hold: a wide range of plant foods across the week, meaning different vegetables, pulses, wholegrains, nuts, seeds and fruit, gives the fibre-fermenting bacteria something to work with. That is worth doing whether or not you take an NSAID, and it is not a counterweight that cancels out a drug.

For protecting the gut lining itself, the evidence is weak. A systematic review published in 2026 pulled together 22 randomised studies of natural products, functional foods and live culture supplements in people taking NSAIDs or aspirin, judged by camera or by tests of how much passes through the gut wall. Some individual products showed protective effects, results for live culture supplements varied depending on which outcome was measured, and the reviewers rated the overall certainty of the evidence as low or very low and called the findings a starting point for future trials rather than a basis for recommendations. We do not give supplement doses, and we would not tell you to take one on that evidence. If you want to try something, ask your pharmacist, who can check it against your other medicines.

When should you see a GP?

Some symptoms in someone taking anti-inflammatory painkillers need medical assessment quickly, not a diet change and not a test. Contact your GP, or NHS 111 out of hours, if you have:

  • Black, tarry or sticky stools, which can be a sign of bleeding higher up in the gut
  • Blood in your stool, or bleeding from the bottom
  • Vomiting blood, or vomit that looks like ground coffee
  • Severe or persistent stomach pain, particularly pain that wakes you at night
  • Unexplained weight loss, or a persistent change in your bowel habit lasting more than three weeks
  • Difficulty swallowing, or persistent vomiting
  • Feeling unusually breathless, tired or pale, which can point to anaemia from slow blood loss
  • New digestive symptoms starting over the age of 50, or a family history of bowel or ovarian cancer

Vomiting blood, passing black tarry stools or severe sudden stomach pain need same-day assessment, so call 999 or go to A&E rather than waiting for an appointment. Also seek urgent advice for a rash, wheezing, or swelling of the face or throat after taking an NSAID, because that may be an allergic reaction. Aspirin and other NSAIDs should not be given to children under 16 unless a doctor has advised it.

This guide is for information only and does not replace medical advice. Speak to your GP or pharmacist about your own treatment.

Sources

  • Bjarnason I, et al. (2018). Mechanisms of damage to the gastrointestinal tract from nonsteroidal anti-inflammatory drugs. Gastroenterology. PubMed | DOI
  • Graham DY, et al. (2005). Visible small-intestinal mucosal injury in chronic NSAID users. Clinical Gastroenterology and Hepatology. PubMed | DOI
  • Castellsague J, et al. (2012). Individual NSAIDs and upper gastrointestinal complications: a systematic review and meta-analysis of observational studies (the SOS project). Drug Safety. PubMed | DOI
  • Drini M (2017). Peptic ulcer disease and non-steroidal anti-inflammatory drugs. Australian Prescriber. PubMed | DOI
  • Otani K, et al. (2017). Microbiota plays a key role in non-steroidal anti-inflammatory drug-induced small intestinal damage. Digestion. PubMed | DOI
  • Rogers MAM, Aronoff DM (2016). The influence of non-steroidal anti-inflammatory drugs on the gut microbiome. Clinical Microbiology and Infection. PubMed | DOI
  • Prizment AE, et al. (2020). Randomised clinical study: oral aspirin 325 mg daily vs placebo alters gut microbial composition and bacterial taxa associated with colorectal cancer risk. Alimentary Pharmacology & Therapeutics. PubMed | DOI
  • Le Bastard Q, et al. (2021). Impact of non-antibiotic drugs on the human intestinal microbiome. Expert Review of Molecular Diagnostics. PubMed | DOI
  • Alam SM, et al. (2022). Selective serotonin reuptake inhibitors increase risk of upper gastrointestinal bleeding when used with NSAIDs: a systematic review and meta-analysis. Scientific Reports. PubMed | DOI
  • Hawkey CJ, et al. (2025). Eradication of Helicobacter pylori for prevention of aspirin-associated peptic ulcer bleeding in adults over 65 years: the HEAT RCT. Health Technology Assessment. PubMed | DOI
  • Masutani N, et al. (2024). Long-term effects of low-dose aspirin on gastrointestinal symptoms and bleeding complications in patients with type 2 diabetes. American Journal of Cardiovascular Drugs. PubMed | DOI
  • Hwang JH, Choi YK (2026). Protective effects of natural products, functional foods, and probiotics on NSAID-induced small intestinal injury: a systematic review. Antioxidants. PubMed | DOI
  • Rannou F, et al. (2016). Efficacy and safety of topical NSAIDs in the management of osteoarthritis: evidence from real-life setting trials and surveys. Seminars in Arthritis and Rheumatism. PubMed | DOI
  • NHS. Non-steroidal anti-inflammatory drugs (NSAIDs). nhs.uk
  • NICE Clinical Knowledge Summaries. NSAIDs: prescribing issues. cks.nice.org.uk

Reading next