Why Is There a Worm in My Toilet? Causes & Fixes

The “worm” in your toilet is most likely not a worm at all. In the vast majority of cases, it’s the larva of a drain fly (also called a moth fly), a tiny insect that breeds in the slimy buildup inside your pipes. Less commonly, you might be looking at an actual earthworm that entered through a cracked sewer line, a bright red midge larva known as a bloodworm, or, in rare cases, evidence of an intestinal parasite. Figuring out which one you’re dealing with is straightforward once you know what to look for.

Drain Fly Larvae: The Most Common Culprit

Drain fly larvae are the number one “worm” people find in toilets. They’re small, dark, and slightly flattened, with narrow strap-like plates running across their upper surface. One homeowner who sent a photo to Michigan State University’s Extension service had 22 of them sitting at the bottom of a single toilet bowl. They’re not unusual, and they’re not a sign your home is dirty in any dramatic way.

These larvae belong to a family of flies called Psychodidae. The adults are tiny, fuzzy, moth-like flies you may have noticed hovering near your bathroom mirror or clinging to the wall. They lay their eggs in the gelatinous, sludgy organic film that naturally accumulates on the inside walls of drain pipes, overflow pipes, toilet tanks, and garbage disposals. The larvae feed on that buildup and can develop into adults in about one to two weeks, though it takes longer in cooler months. If your toilet or a nearby drain doesn’t get much use, conditions are even more favorable for them.

What Earthworms and Bloodworms Look Like

If the creature in your toilet is brown, clearly segmented with visible ring-like stripes, and looks like the kind of worm you’d find in garden soil, it’s probably an earthworm. Earthworms need constant moisture to survive, and they can enter your plumbing through cracks in a sewer line. Finding one is uncommon, but it does point to a potential problem with your pipes that’s worth investigating.

Bloodworms, on the other hand, are bright red and thread-thin. They’re actually midge fly larvae, and their red color comes from hemoglobin, the same oxygen-carrying molecule in your blood. That hemoglobin lets them thrive in low-oxygen, stagnant water. You’ll typically find them if water has been sitting undisturbed in a toilet or pipe for a while, especially in nutrient-rich conditions. They’re more of a water quality indicator than a health threat.

Could It Be an Intestinal Parasite?

This is what most people are really worried about, and the honest answer is: it’s possible but unlikely. Most intestinal worm eggs are microscopic and invisible to the naked eye. There are two exceptions worth knowing about.

Pinworms are tiny, white, thread-like worms about the length of a staple. They’re the most common intestinal parasite in the U.S. and primarily affect children. Female pinworms lay eggs around the anus at night, which causes intense itching. If you or your child has persistent anal itching, especially at night, and you’re seeing small white threads in stool or the toilet, pinworms are a real possibility.

Tapeworm segments can also show up in the toilet. They don’t look like traditional worms. Instead, you’ll see what resembles small, flat grains of white rice embedded in stool. Tapeworm infections come from eating undercooked pork, beef, or fish, or from ingesting eggs from a contaminated surface. If what you’re seeing matches this description, it’s worth getting checked out.

The key distinction: parasites will be in or attached to your stool. Drain fly larvae and bloodworms will be free-floating in the water or clinging to the sides of the bowl, completely independent of anything you produced.

Are Toilet Worms Dangerous?

Drain fly larvae are generally considered a nuisance pest, not a direct health hazard in a typical home. However, they aren’t entirely harmless either. Research published by the CDC found that drain flies and their larvae can carry and spread antibiotic-resistant bacteria picked up from contaminated biofilm in plumbing systems. In hospital settings, this has been a documented concern. There are also rare case reports of drain fly larvae being found in wounds and even tear ducts, a condition called myiasis.

For most households, the real risk is low. But the presence of drain fly larvae does mean you have organic sludge building up somewhere in your plumbing, and that’s worth addressing regardless of the health implications.

How to Get Rid of Them

Pouring bleach down the drain might kill the larvae it contacts, but it won’t solve the problem. Bleach runs straight through without breaking down the slimy biofilm where the eggs and larvae actually live. The goal is to physically remove that film.

Start by scrubbing the inside of your toilet tank, the overflow pipe, and any nearby drains with a stiff brush. For drain pipes, foaming enzymatic cleaners are effective because they cling to the pipe walls and dissolve the gelatinous buildup that larvae feed on. You can find these at most hardware stores, often marketed for drain maintenance or organic buildup. For severe or persistent infestations, professional high-pressure drain cleaning can strip the organic material from the full length of your pipes.

The critical detail most people miss: you need to keep this up for at least three weeks. That’s enough time to outlast the full life cycle from egg to adult. If you clean once and stop, surviving eggs will hatch and start the cycle over again. After that initial push, periodic drain cleaning every few weeks prevents the biofilm from building back up.

When the Problem Points to Your Pipes

If you’re finding actual earthworms rather than larvae, the issue isn’t biofilm. It’s structural. Earthworms enter plumbing through cracks or gaps in sewer lines, often where pipes have shifted, corroded, or been damaged by tree roots. A single earthworm might be a fluke, but if it happens repeatedly, you likely have a compromised section of pipe underground. A plumber can run a camera inspection through your sewer line to find the breach. Fixing it not only stops the worms but prevents more serious problems like sewage backups or groundwater infiltration.