Metformin does not appear to cause urinary tract infections. The largest matched study on the topic found that people with type 2 diabetes who took metformin had essentially the same UTI rate as those who did not, and metformin users were actually far less likely to die from UTI-related complications. The confusion is understandable: people taking metformin often do experience UTIs, but the culprit is overwhelmingly the underlying diabetes rather than the drug itself. Emerging lab research even hints that metformin may have direct antibacterial properties against the very organisms responsible for most UTIs.
What the Clinical Data Actually Show
A large retrospective cohort study compared matched groups of over 40,000 metformin users and nonusers with type 2 diabetes. Roughly 3.2% of metformin users developed a UTI during follow-up, compared to about 2.7% of nonusers. That small numerical gap did not reach statistical significance: after adjusting for other health factors, the risk of developing a UTI, a recurrent UTI, or sepsis was not meaningfully different between the two groups.1PubMed Central. Role of Metformin in Morbidity and Mortality Associated with Urinary Tract Infections in Patients with Type 2 Diabetes In other words, metformin neither raised nor lowered the chances of getting a UTI in the first place.
The more striking finding was what happened after infections occurred. Metformin users had a roughly 42% lower risk of dying from UTI or sepsis compared to nonusers, and that protective effect grew stronger the longer someone had been taking the drug.1PubMed Central. Role of Metformin in Morbidity and Mortality Associated with Urinary Tract Infections in Patients with Type 2 Diabetes That is a meaningful difference, and it suggests metformin may help the body handle infections more effectively once they take hold. A drug that truly caused UTIs would be unlikely to simultaneously protect against the worst outcomes of those infections.
Diabetes Itself Is the Real UTI Risk Factor
People with type 2 diabetes face a substantially higher UTI risk than the general population regardless of what medication they take. The risk of bladder infections is about one and a half to two times higher in people with diabetes, and the risk of kidney infections may be two to four times higher.2The Open Infectious Diseases Journal. Diabetes and Risk of Community-Acquired Respiratory Tract Infections, Urinary Tract Infections, and Bacteremia This elevated risk exists independent of which diabetes medication someone is using.
Several features of diabetes conspire to make the urinary tract more vulnerable to infection. High blood sugar creates a hospitable environment for bacteria, because glucose spills into the urine and essentially feeds the organisms that cause UTIs. The immune system in people with diabetes also tends to function less efficiently, with white blood cells being slower to respond to invaders. On top of that, nerve damage from long-standing diabetes can impair bladder function, leaving residual urine that serves as a breeding ground for bacteria.3PubMed Central. Urinary tract infections in patients with type 2 diabetes mellitus: review of prevalence, diagnosis, and management The duration of diabetes and the presence of complications like nerve damage in the bladder appear to matter more than day-to-day blood sugar control when it comes to UTI risk.2The Open Infectious Diseases Journal. Diabetes and Risk of Community-Acquired Respiratory Tract Infections, Urinary Tract Infections, and Bacteremia
This distinction matters because it reframes the question. When someone starts metformin and later develops a UTI, the instinct is to blame the new medication. But in most cases, the diabetes itself was already raising their infection risk. Metformin just happened to arrive around the same time.
Metformin’s Surprising Anti-Infection Properties
Far from promoting infections, a growing body of laboratory research suggests metformin may actually work against the bacteria responsible for most UTIs. Escherichia coli (E. coli) causes the vast majority of urinary tract infections, and several recent studies have found that metformin can interfere with E. coli’s ability to establish and maintain infections.
One of the ways bacteria resist treatment is by forming biofilms, sticky communities of organisms that coat surfaces like the bladder wall and are extremely difficult for antibiotics to penetrate. Lab experiments have shown that metformin can both prevent E. coli biofilms from forming and break apart biofilms that have already established. In one study, metformin achieved roughly 70% inhibition of new biofilm formation at certain concentrations and significantly reduced the number of live bacteria inside mature biofilms. Metformin also appeared to work synergistically with standard antibiotics, making them more effective against biofilm-protected bacteria.4PubMed Central. Repurposing metformin as a dual-function agent to combat E. coli-induced mastitis: Mechanistic insights into biofilm dispersion and AMPK/SIRT1-mediated NF-κB inhibition
A separate study tested metformin directly against urinary E. coli isolates, the actual strains collected from people with UTIs. Metformin reduced biofilm formation by roughly 52% to 73% and turned down the activity of genes that help bacteria stick to the urinary tract lining and communicate with each other to coordinate infection.5PubMed Central. Effects of empagliflozin and metformin on biofilm formation and pathogenicity factors of urinary Escherichia coli isolates These are lab results rather than evidence from human patients, and the concentrations of metformin tested were much higher than what typically circulates in the bloodstream. Still, some of these concentrations are plausible in urine, since metformin is heavily concentrated by the kidneys during excretion.
Beyond direct antibacterial effects, metformin also appears to boost the immune system’s ability to handle bacterial invaders. Research has shown that metformin activates a cellular energy-sensing pathway that improves how immune cells engulf and destroy bacteria. In one set of experiments, metformin enhanced the ability of macrophages (a key type of immune cell) to swallow and kill a particularly dangerous strain of Klebsiella pneumoniae, reduced tissue damage in infected mice, and dampened the excessive inflammatory response that can make severe infections deadly.6PubMed Central. Metformin Enhances Macrophage Phagocytosis and Intracellular Clearance of Hypervirulent Klebsiella pneumoniae via AMPK Activation This ability to calm harmful inflammation while simultaneously helping the immune system clear bacteria could explain why metformin users in the large cohort study were less likely to die from UTI-related sepsis.7PubMed Central. The role of AMPK-dependent pathways in cellular and molecular mechanisms of metformin: a new perspective for treatment and prevention of diseases
How Metformin Compares to Other Diabetes Drugs
If you are worried about UTIs as a side effect of diabetes medication, the drug class that deserves your attention is not metformin but rather SGLT2 inhibitors. These newer medications, which include drugs like empagliflozin, dapagliflozin, and canagliflozin, work by causing the kidneys to dump excess glucose into the urine. That glucose-rich urine is exactly the kind of environment that UTI-causing bacteria thrive in.
A real-world study found that the overall UTI rate was about 33.5% in patients taking SGLT2 inhibitors compared to roughly 11.7% in those on other diabetes medications, making the SGLT2 inhibitor group about 3.7 times more likely to develop a UTI.8PubMed Central. The Incidence and Risk Factors of Urinary Tract Infection in Patients with Type 2 Diabetes Mellitus Using SGLT2 Inhibitors: A Real-World Observational Study A Korean retrospective study similarly found that SGLT2 inhibitors added to metformin therapy significantly increased the risk of both genital and urinary tract infections compared to adding other drug classes to metformin.9PubMed Central. Risk of genital and urinary tract infections associated with SGLT-2 inhibitors as an add-on therapy to metformin in patients with type 2 diabetes mellitus: A retrospective cohort study in Korea
An analysis of the FDA’s adverse event reporting database found a higher signal for UTIs with SGLT2 inhibitors than with metformin. Interestingly, when patients were on both drugs together, UTI reports were lower than with SGLT2 inhibitors alone, suggesting that metformin may partially offset the UTI risk introduced by the SGLT2 inhibitor.10PubMed Central. Urinary Tract Infections and Fungal Infections Associated with Sodium-Glucose Co-transporter-2 (SGLT-2) Inhibitors and Metformin Combination: A Real-World Study from 2013 to 2023 Based on the FDA Adverse Event Reporting System (FAERS) Database A meta-analysis comparing the two classes directly found that while SGLT2 inhibitors significantly increased reproductive tract infections, the difference in UTI rates specifically did not quite reach statistical significance.11PubMed Central. The Cardiovascular Benefits and Infections Risk of SGLT2i versus Metformin in Type 2 Diabetes: A Systemic Review and Meta-Analysis But the overall direction is consistent: SGLT2 inhibitors pose a real urinary infection concern in a way that metformin simply does not.
If your doctor has prescribed an SGLT2 inhibitor alongside metformin and you are experiencing recurrent UTIs, it is worth discussing whether the SGLT2 inhibitor specifically could be contributing. Metformin is unlikely to be the problem drug in that combination.
The Gastrointestinal Side Effect Question
One theoretical pathway that occasionally comes up is whether metformin’s well-known gastrointestinal side effects could indirectly promote UTIs. Metformin commonly causes diarrhea, especially in the first weeks of treatment, and chronic diarrhea can lead to perineal irritation and contamination of the urethral area with gut bacteria, including E. coli. The anatomical proximity between the two areas means that anything increasing fecal contamination could, in theory, raise UTI risk, particularly in women.
This is a plausible mechanism on paper, but there is no clinical evidence that it translates into measurable UTI increases. The large matched cohort studies that compared metformin users to nonusers already accounted for the full spectrum of metformin’s real-world effects, GI side effects included, and still found no significant difference in UTI rates.1PubMed Central. Role of Metformin in Morbidity and Mortality Associated with Urinary Tract Infections in Patients with Type 2 Diabetes If metformin-related diarrhea were meaningfully driving UTIs, you would expect it to show up as at least a small signal in these studies. It does not. Extended-release formulations of metformin, which produce significantly fewer GI side effects, are also widely available if diarrhea is a persistent concern.
How Metformin Travels Through the Urinary Tract
Metformin is unusual among medications in that the kidneys excrete it largely unchanged. It is not broken down by the liver into inactive metabolites the way most drugs are. Instead, it passes through the kidneys intact and is actively secreted into the urine, meaning the kidneys pump it out at a rate four to five times higher than simple filtration would predict.12BMJ Open. Increasing metformin concentrations and its excretion in both rat and porcine ex vivo normothermic kidney perfusion model This results in urine concentrations of metformin that are substantially higher than blood levels.
Those elevated urinary concentrations are interesting in light of the lab findings about metformin’s ability to disrupt bacterial biofilms. The concentrations that reduced E. coli biofilm formation in laboratory experiments, while high, are not wildly out of range for what the bladder actually encounters. Whether the urine concentrations are sufficient to produce a meaningful antibacterial effect in a living person remains unproven, but the pharmacokinetics at least make it possible.
One study looked at whether metformin alters urinary chemistry in ways that could affect stone formation or, by extension, infection risk. People with diabetes on metformin did have lower urine pH than people without diabetes, but this appeared to be a feature of diabetes itself: when researchers compared diabetic patients on metformin to diabetic patients not on metformin, there were no significant differences in any urinary parameter measured.13Canadian Urological Association Journal. Is metformin use associated with changes in urinary parameters in stone formers? This reinforces the broader pattern. Metformin users may show urinary changes compared to healthy people, but those changes trace back to the diabetes rather than the drug.
Metformin and the Microbiome
Metformin reshapes the community of bacteria living in the gut, and researchers have wondered whether these shifts could have downstream effects on infection risk. A systematic review of 13 studies found that metformin altered the abundance of various bacterial populations in the gut, including increases in some Escherichia species.14PubMed Central. Effects of metformin on the gut microbiota: A systematic review Since E. coli is both a normal gut resident and the primary cause of UTIs, this observation has understandably raised eyebrows.
The findings across studies were inconsistent, though. Some bacterial groups went up in one study and down in another, and the overall picture was of complex, person-specific shifts rather than a single predictable pattern. The increase in Escherichia abundance in the gut does not automatically mean more E. coli will reach the urinary tract, and the clinical data, as we have seen, does not show a corresponding rise in UTIs. The gut microbiome shifts produced by metformin are better understood as part of the drug’s metabolic effects than as a plausible UTI mechanism. Metformin’s microbiome changes may in fact contribute to some of its therapeutic benefits, including improved blood sugar regulation through altered bacterial metabolism in the intestine.
Practical Steps if You Are Prone to UTIs on Metformin
Even though metformin itself is not the cause, experiencing UTIs while taking the drug is understandably frustrating. The following strategies address the actual risk factors at play:
- Blood sugar management: Tighter glucose control reduces the amount of sugar in your urine, which limits the food supply for bacteria. This is one of the most effective ways to lower your UTI risk, and metformin itself contributes to this goal.
- Hydration: Drinking enough water dilutes urine and promotes frequent urination, which physically flushes bacteria out of the bladder before they can establish an infection.
- Complete bladder emptying: If you have any degree of diabetic nerve damage affecting the bladder, residual urine can harbor bacteria. Taking your time when urinating and double-voiding (urinating, waiting a moment, and trying again) can help.
- Review your full medication list: If you are also taking an SGLT2 inhibitor, that drug is a far more likely contributor to recurrent UTIs than metformin. Discuss with your doctor whether switching to a different add-on therapy makes sense.
- GI side effect management: If metformin gives you persistent diarrhea, ask about extended-release formulations, which are gentler on the gut. Taking the medication with food also helps.
Why This Misconception Persists
The belief that metformin causes UTIs likely persists for a few reinforcing reasons. First, metformin is the most widely prescribed diabetes medication in the world, so a huge number of people are taking it at any given time. When that many users also belong to a population (people with diabetes) that has an inherently elevated UTI risk, coincidental timing between starting the drug and developing an infection is virtually guaranteed for some percentage of users.
Second, metformin is often prescribed alongside or before SGLT2 inhibitors, which do carry a genuine UTI risk. When someone on a combination regimen develops an infection, both drugs may get blamed equally, even though the evidence points to the SGLT2 inhibitor as the more likely contributor.10PubMed Central. Urinary Tract Infections and Fungal Infections Associated with Sodium-Glucose Co-transporter-2 (SGLT-2) Inhibitors and Metformin Combination: A Real-World Study from 2013 to 2023 Based on the FDA Adverse Event Reporting System (FAERS) Database
Third, the GI side effects of metformin are so common and so noticeable that the drug feels like it is doing something disruptive to the body, which can make it seem like a plausible suspect for any new problem that develops. The diarrhea is real and can be genuinely unpleasant, but it does not appear to translate into higher infection rates in the urinary tract. If anything, the emerging research on metformin’s immune-boosting and antibiofilm properties suggests the drug may be quietly working in the other direction, helping the body manage infections rather than inviting them.