Can Feces Cause a UTI? The Link Explained

Fecal bacteria are the leading cause of urinary tract infections. The vast majority of UTIs begin when bacteria that normally live in the intestines travel from the anal area to the urethra and then the bladder. In roughly 87% of UTI cases, the infecting strain can be found living in the patient’s own stool, making your gut the primary staging ground for bladder infections.1PubMed. Faecal Escherichia coli from patients with E. coli urinary tract infection and healthy controls who have never had a urinary tract infection The connection between feces and UTIs runs deeper than most people realize, involving anatomy, behavior, gut health, and even the specific genetic toolkit bacteria carry.

How Fecal Bacteria Reach the Urinary Tract

The most common UTI-causing bacterium, E. coli, lives naturally in the human gut and is shed in stool. The gut is its primary habitat, and an overgrowth of disease-causing strains there raises your risk for a urinary infection.2PubMed Central. Gut Microbiome Implication and Modulation in the Management of Recurrent Urinary Tract Infection The journey from gut to bladder is sometimes called the “gut-bladder axis,” and it works like a pipeline: bacteria leave the body in stool, colonize the skin around the anus and perineum, and then migrate forward to the urethral opening. Once at the urethra, they can climb upward into the bladder and trigger an infection.

This is not a rare or unusual pathway. Multiple research groups have recovered identical bacterial strains from both the stool and the urine of UTI patients, confirming that the same organism travels between the two sites.3PubMed Central. The Role of the Gut Microbiome in Urinary Tract Infections: A Narrative Review It is not a coincidence or contamination; the bacteria in your bladder during a UTI are, in most cases, bacteria that recently lived in your colon.

Why Anatomy Makes Some People More Vulnerable

The physical distance between the anus and the urethral opening is one of the strongest determinants of UTI risk. In women and girls, the urethra is both shorter and closer to the anus than in men, which is the main reason UTIs are far more common in females. A study of children in Iraq found UTIs were more common in girls (55%) than boys (45%), consistent with global patterns attributed to the shorter female urethra and its proximity to the anus.4Alnakhla Journal of Science. Epidemiological and microbiological study of urinary tract infections in children in Babylon Governorate

This anatomical factor is not limited to cisgender women. Research using MRI imaging has found that transgender women who have undergone vaginoplasty may have an even shorter distance between the neourethral opening and the anus compared to cisgender women, potentially contributing to higher UTI rates in that population. The researchers emphasized the importance of voiding regularly, wiping away from the urethra, and urinating after dilation or intercourse to help reduce bacterial colonization.5The Journal of Sexual Medicine. An MRI-Based, Anatomic Description of the Distance from the Urethral Meatus to the Anal Verge in Cis and Transgender Women

Wiping Direction Matters More Than You Might Think

One of the most direct ways fecal bacteria get transferred to the urethra is through wiping after using the toilet. The direction you wipe influences UTI risk. Wiping from back to front after urination or a bowel movement carries bacteria from the anal region toward the urethral opening, while wiping front to back moves bacteria away from it. A study published in Acta Obstetricia et Gynecologica Scandinavica confirmed the association: back-to-front wiping was linked to a greater risk of developing a UTI than front-to-back wiping.6PubMed. Association between urinary tract infection and postmicturition wiping habit

The specifics get more granular than just direction. A Japanese study examined different wiping styles among women and found that one particular method, reaching from the front between the legs, was associated with a significantly higher number of lifetime UTI episodes in middle-aged women (roughly ages 40 to 60).7PubMed Central. Post-Toilet Wiping Style Is Associated With the Risk of Urinary Tract Infection in Women The takeaway is straightforward: any wiping technique that drags material from the anal area toward the urethra increases the chance of moving fecal bacteria where they can cause trouble.

Sexual Activity as a Transfer Mechanism

Sex is another well-documented way fecal bacteria end up near or inside the urethra. The mechanical action of vaginal intercourse can push bacteria that have colonized the vaginal or perineal area into the urethra and bladder. This is why UTIs are sometimes called “honeymoon cystitis” when they follow increased sexual activity. The disruption of the normal vaginal bacterial environment during sex can also make it easier for E. coli to establish itself.8PubMed Central. Impact of genital hygiene and sexual activity on urinary tract infection during pregnancy

Anal intercourse followed by vaginal intercourse poses a particularly direct risk, because it can physically transport fecal bacteria from the anus to the vaginal and urethral area.9Obstetrics & Gynecology International Journal. Sexual activity and the risk of acute uncomplicated urinary tract infection in premenopausal women Urinating after sex is one of the most commonly recommended preventive measures, because flushing urine through the urethra can help wash out bacteria before they establish an infection.

Not All Gut E. coli Are Equally Dangerous

Your intestines are home to billions of E. coli, and the overwhelming majority never cause a UTI. The strains that do are equipped with a specific set of tools that help them survive outside the gut, latch onto the bladder wall, and resist your immune defenses. These strains are called uropathogenic E. coli (UPEC), and they carry adhesins, toxins, and other features that generic gut strains lack.10PubMed Central. Virulence factors in Escherichia coli urinary tract infection

One study compared E. coli strains isolated from UTI patients’ urine against strains from the stool of healthy people. About 65% of the UTI-causing isolates carried identifiable virulence traits, compared to only 20% of control stool isolates. The UTI strains were also far more likely to produce biofilm (62% versus 1%) and to display surface molecules that help them stick to urinary tract tissue.11PubMed Central. Virulence factors of uropathogenic Escherichia coli (UPEC) and correlation with antimicrobial resistance So the question is not just whether fecal bacteria reach the urethra, but whether the particular strains present in your gut are the aggressive type equipped to cause an infection.

This also explains why some people get recurrent UTIs and others never get one despite similar hygiene: individual gut flora vary enormously, and a person whose gut harbors a large population of UPEC strains faces a fundamentally different risk than someone whose gut does not.

Beyond E. coli: Other Fecal Bacteria That Cause UTIs

E. coli accounts for the majority of UTIs, but it is not the only gut organism that can infect the urinary tract. Enterococcus faecalis, another bacterium that lives in the human intestine, is responsible for a meaningful share of community-acquired UTIs. In one study examining patients with E. faecalis UTIs, about 88% of the urinary strains were also found in the patient’s stool, and roughly 63% of those matched the same antibiotic resistance patterns in both locations.12Archives of Pediatric Infectious Diseases. Molecular Detection of Antibiotic Resistance Genes Among Enterococcus faecalis Isolated From Fecal and Urine Samples of Patients With Community-Acquired Urinary Tract Infections This strongly suggests the gut was the source. Other gut-dwelling bacteria like Klebsiella, Proteus, and Pseudomonas species also cause UTIs through the same fecal-to-urinary pathway, especially in hospital settings or people with compromised immune systems.

Constipation and Fecal Impaction

An often-overlooked contributor to UTIs, especially in children and older adults, is constipation. When stool builds up in the rectum, it can put physical pressure on the bladder and urethra, making it harder to fully empty the bladder. Residual urine left behind after incomplete voiding gives bacteria a warm, stagnant environment to grow in. But the link goes beyond mechanics: the prolonged presence of stool in the lower bowel keeps a large mass of bacteria in close proximity to the urinary tract for extended periods.

A pediatric study found that fecal impaction seen on imaging was significantly more common in children who had recurrent UTIs (about 65%) compared to those who did not (about 37%). When researchers controlled for other factors, fecal impaction stood out as an independent risk factor for UTI recurrence.13PubMed. Fecal impaction detected by imaging predicts recurrent urinary tract infection Interestingly, the distinction mattered only when constipation was severe enough to show up on imaging; simply asking about stool frequency did not capture the risk. This means a child or adult who appears to have regular bowel movements could still have significant stool retention that elevates UTI risk.

Incontinence and Older Adults

Fecal incontinence creates one of the most direct exposure pathways imaginable: when stool comes into uncontrolled contact with periurethral skin, bacteria gain easy access to the urethra. This problem is particularly acute in older adults, nursing home residents, and people with mobility limitations who may not be able to clean themselves promptly. A large study of older Medicare beneficiaries found that the combination of fecal and urinary incontinence was associated with dramatically higher rates of complications, including UTIs. Depending on the subgroup, risk increases ranged from about 22% higher to 185% higher compared to people without incontinence.14PubMed Central. The Prevalence of Incontinence and Its Association With Urinary Tract Infections, Dermatitis, slips and falls, and Behavioral Disturbances Among Older Adults in Medicare Fee-for-Service

Catheter use compounds the problem further. Catheter-associated UTIs are the most common type of healthcare-associated infection, and the presence of a catheter essentially creates a direct bridge from external bacteria into the bladder, bypassing many of the body’s usual defenses. Fecal contamination of the catheter insertion site or the drainage system is a recognized route of infection in hospital and long-term care settings.

How Your Body Fights Off Fecal Bacteria

Given that fecal bacteria sit just centimeters from the urethral opening, it is worth asking why UTIs do not happen even more often than they do. Your urinary tract has several built-in defense mechanisms. The most basic is the physical flushing action of urination itself: urine flowing outward through the urethra washes bacteria away before they can gain a foothold. This is one reason that drinking plenty of fluids and not holding urine for extended periods are standard preventive recommendations.

A more specialized defense involves a protein called uromodulin (also known as Tamm-Horsfall protein), the most abundant protein in human urine. Uromodulin forms long filaments that act as decoys. The sticky surface molecules that E. coli use to attach to bladder cells are the same molecules that bind to uromodulin. When bacteria latch onto uromodulin instead of the bladder wall, they get trapped in filament clusters and flushed out during urination.15PubMed. Architecture and function of human uromodulin filaments in urinary tract infections Research has shown that uromodulin binds specifically to the variant of E. coli surface adhesin that is most common in UTI-causing strains, suggesting the protein evolved precisely to counter the most dangerous fecal invaders.16Journal of Biological Chemistry. Tamm-Horsfall Protein Binds to Type 1 Fimbriated Escherichia coli and Prevents E. coli from Binding to Uroplakin Ia and Ib Receptors

Why Recurrent UTIs Keep Coming Back From the Gut

For the roughly 25 to 30% of women who experience a second UTI within six months of their first, the gut reservoir is the central problem. Antibiotics can clear the infection from the bladder, but the same uropathogenic strains often remain in the intestines. After antibiotic treatment ends, these surviving gut bacteria can recolonize the urinary tract and trigger another infection. A longitudinal, multi-center study confirmed this pattern: UPEC strains can silently live in the gut and the urinary tract between symptomatic episodes, and antibiotic courses that kill off competing gut bacteria actually allow E. coli populations to bloom and repopulate the bladder.17PubMed Central. Gut microbiome correlates of recurrent urinary tract infection: a longitudinal, multi-center study

This creates a frustrating cycle. Each round of antibiotics clears the bladder infection but disrupts the gut microbiome, potentially making the gut a more hospitable environment for the very strains causing the problem. The gut also serves as a reservoir for antibiotic resistance genes, meaning that repeated antibiotic courses can breed increasingly drug-resistant strains that are harder to treat the next time around.

Reshaping the Gut to Prevent UTIs

Because the gut is the source of most UTI-causing bacteria, some researchers have explored whether changing the gut microbiome could break the cycle of recurrent infections. The most dramatic approach tested so far is fecal microbiota transplantation (FMT), in which stool from a healthy donor is transferred into the patient’s intestine to overhaul its bacterial population. A small pilot study of women with recurrent UTIs found that the median number of UTIs dropped from three in the six months before transplant to one in the six months after, though the result narrowly missed conventional statistical significance.18PubMed Central. Fecal Microbiota Transplantation for the Treatment of Refractory Recurrent Urinary Tract Infection

More encouragingly, patients who received FMT for a different condition, recurrent C. difficile infection, also experienced a significant reduction in their recurrent UTIs as an unexpected bonus. The transplant appeared to improve the antibiotic susceptibility of the organisms that did cause subsequent UTIs, making them easier to treat.19PubMed. Fecal Microbiota Transplantation for Recurrent Clostridium difficile Infection Reduces Recurrent Urinary Tract Infection Frequency These findings are preliminary, and FMT for UTIs remains experimental. But they underscore a concept that is gaining ground in urology and infectious disease: if you want to stop UTIs at their source, you may need to treat the gut, not just the bladder.

Bidet Toilets and Unexpected Hospital Risks

Bidets are widely assumed to improve hygiene and therefore reduce UTI risk, and for many home users that may be true. But research from hospital settings tells a more complicated story. Studies have found that the nozzle surfaces and spray water of shared bidet toilets can become contaminated with fecal bacteria, including E. coli, Pseudomonas aeruginosa, and even antibiotic-resistant organisms. In a hospital environment, where patients often have weakened immune systems or urinary catheters, a shared bidet becomes a potential vehicle for cross-infection rather than a tool for cleanliness. Researchers have recommended that immunocompromised patients exercise caution with shared bidet use in clinical settings.

At home, where a bidet is used by the same person or household, the contamination risk is much lower. The concern is specific to shared devices in environments where dangerous bacteria are circulating, not a blanket argument against bidets. Keeping nozzles clean and following manufacturer maintenance instructions addresses most of the risk for household use.

Practical Steps That Reduce the Fecal-to-Urinary Transfer

Because the connection between feces and UTIs is fundamentally about bacterial migration, prevention focuses on disrupting that migration at every step. The most commonly recommended measures include:

  • Wipe front to back: This moves bacteria away from the urethra rather than toward it, and the evidence consistently supports the habit.
  • Urinate after sex: Flushing the urethra shortly after intercourse helps clear bacteria that may have been pushed toward the bladder.
  • Stay hydrated: Frequent urination mechanically washes bacteria out of the urethra and bladder before they can establish an infection.
  • Treat constipation: Keeping the bowel clear reduces prolonged bacterial contact with periurethral tissue and allows the bladder to empty more completely.
  • Change incontinence products promptly: Minimizing skin contact time with stool reduces bacterial colonization of the periurethral area.

None of these measures is foolproof, and some people will still get UTIs despite following every recommendation. That reflects the reality that the human gut is a permanent reservoir of potential uropathogens, and complete elimination of that reservoir is neither possible nor desirable, since the same gut bacteria perform essential digestive and immune functions. The goal is not to sterilize anything but to limit the opportunities bacteria have to cross from one organ system to another.

Aaron Ndlovu

After completing his nephrology fellowship at the University of Alabama at Birmingham, Aaron Ndlovu went on to spend 11 years treating glomerular disease and chronic kidney disease. He is certified in nephrology by the American Board of Internal Medicine and sees patients in the outpatient kidney clinic of a university health system. He writes about CKD stages, protein in the urine, and how to read kidney function results such as creatinine and eGFR.