When you flush, your waste drops into a pipe that connects to a much larger underground network, beginning a journey that typically ends at a wastewater treatment plant where it is broken down, disinfected, and released as treated water into a river, lake, or ocean. The whole trip from toilet to treated discharge can take anywhere from a few hours to over a day, depending on how far you live from the plant and how the local system is designed. Along the way, the solids are separated, consumed by bacteria, and converted into byproducts that range from fertilizer to electricity. The process is more elaborate than most people imagine, and a few parts of it still have unresolved problems.
The Sewer Ride
The pipe beneath your toilet connects to a lateral line that runs from your home to a larger sewer main under the street. From there, your waste joins flows from every other building on the block and moves through progressively bigger pipes. Most sewer systems rely on gravity: pipes are laid at a slight downhill angle so everything flows without pumping. Where the terrain doesn’t cooperate, lift stations (essentially underground pump rooms) push the sewage uphill until gravity can take over again. Some newer neighborhoods use pressurized or vacuum systems instead, but gravity sewers remain the backbone of most cities.
By the time your flush reaches the treatment plant, it has merged with wastewater from thousands of other homes, businesses, and sometimes industrial facilities. The combined flow is called influent, and it’s a dilute mix of human waste, food scraps from garbage disposals, soap, cleaning chemicals, and whatever else went down a drain. A typical city plant handles tens of millions of gallons of influent per day.
The Treatment Plant, Step by Step
Treatment plants vary in layout, but nearly all follow the same sequence of escalating cleanup stages. The goal is to remove solids, break down organic matter, strip out nutrients, and kill pathogens before the water is discharged.
Screening and Primary Treatment
The first stop is a set of screens and grit chambers that catch large debris: rags, sticks, wipes, plastic items, sand, and gravel. Anything that would clog or damage equipment gets removed here and sent to a landfill. After screening, the flow enters large settling tanks called primary clarifiers, where heavier solids sink to the bottom and lighter materials like grease float to the top. Both are skimmed off. The sludge that settles out is pumped away for separate processing. This step alone removes a substantial share of suspended solids from the water.
Secondary (Biological) Treatment
Primary settling takes care of what gravity can pull out, but dissolved organic material is still in the water. That’s where biology comes in. In the most common setup, called activated sludge, the water flows into large aerated tanks where colonies of bacteria and other microorganisms feed on the dissolved waste. Air is constantly pumped in to keep the bacteria thriving. These microbes consume the organic material and convert it into cell mass, carbon dioxide, and water. After several hours in the aeration tanks, the mixture moves to secondary clarifiers, where the bacteria clump together and settle out. Much of that settled biomass is recycled back to the aeration tanks to keep the colony going; the excess becomes part of the sludge stream.
Nutrient Removal
Nitrogen and phosphorus in wastewater can cause algae blooms if released into rivers and coastal waters, so many plants add a nutrient-removal step. Specialized bacteria convert ammonia to nitrate and then to harmless nitrogen gas, which bubbles off into the atmosphere. Phosphorus removal uses either chemical precipitation or a biological process in which certain organisms accumulate phosphorus in their cells. Modern membrane-based systems have achieved removal rates above 90% for both nitrogen and phosphorus.1PubMed. Biological nutrient removal in an MBR treating municipal wastewater with special focus on biological phosphorus removal
Disinfection
By the time secondary and nutrient treatment are done, the water is visually clear but still contains bacteria and viruses. Disinfection is the final safety step before discharge. The three most common methods are chlorination, ultraviolet (UV) light, and ozonation. Chlorine is cheap and effective but can form harmful byproducts when it reacts with residual organic matter, so many plants that use chlorine add a dechlorination step afterward. UV light damages the DNA of pathogens so they can’t reproduce, and it leaves no chemical residue. Ozone is a strong oxidizer that handles viruses and protozoa especially well. Research comparing the three has highlighted UV as an effective and competitive option for most applications, with ozone preferred when higher-quality output is needed, such as for groundwater recharge.2Water Science and Technology. Advanced wastewater disinfection technologies: State of the art and perspectives All three methods reduce antibiotic resistance genes in the treated water as well, though UV and ozone do so partly by breaking apart bacteria and releasing their DNA into the water rather than fully destroying it.3Chemical Engineering Journal. Effects and mechanisms of ultraviolet, chlorination, and ozone disinfection on antibiotic resistance genes in secondary effluents of municipal wastewater treatment plants
After disinfection, the treated water, now called effluent, is released into a nearby body of water. In many places, the quality of this effluent is high enough that the river or lake downstream is safe for swimming and fishing.
What Happens to the Sludge
The solids collected during primary and secondary treatment are pumped into digesters, large sealed tanks where anaerobic bacteria break down the organic material in the absence of oxygen. This process, called anaerobic digestion, reduces the volume of sludge, kills most pathogens, and produces biogas, a mix of roughly 60% methane and 40% carbon dioxide. That biogas is increasingly captured and used as a fuel source. Some plants burn it to generate electricity that powers the facility itself; others upgrade it to pipeline-quality natural gas. Thermophilic digestion, which operates at higher temperatures, can boost methane output and achieve complete pathogen removal in the leftover material, making it safer for reuse.4Renewable Energy. Optimising sewage sludge anaerobic digestion for resource recovery in wastewater treatment plants The broader potential is significant: wastewater treatment plants are increasingly viewed not just as waste processors but as facilities that can produce renewable energy and green chemicals.5PubMed Central. Anaerobic Digestion for Producing Renewable Energy-The Evolution of This Technology in a New Uncertain Scenario
After digestion, the remaining material is dewatered and stabilized into what the industry calls biosolids. In many countries, biosolids are applied to agricultural land as fertilizer and soil conditioner. Long-term studies show that this practice increases soil organic matter, total nitrogen, and available phosphorus while reducing soil alkalinity. However, it is not without downsides: zinc and copper can accumulate in topsoil over years of application, and increased phosphorus availability raises concerns about runoff into waterways.6PubMed. Reuse of liquid, dewatered, and composted sewage sludge on agricultural land: effects of long-term application on soil and crop Biosolids that don’t go to farms are typically incinerated or sent to landfills.
When Rain Overwhelms the System
Many older cities, particularly in the northeastern United States and parts of Europe, have combined sewer systems, meaning stormwater and sewage share the same pipes. During dry weather, everything flows to the treatment plant normally. But during heavy rainstorms, the volume of water surging through the system can exceed the plant’s capacity. When that happens, the excess is diverted directly into rivers, harbors, or the ocean through relief points called combined sewer overflows (CSOs). This untreated or barely treated mix of rainwater and raw sewage is one of the biggest remaining water-quality problems in urban areas.7Discover Water. Ecological impacts of combined sewer overflows on receiving waters
The bacterial load from a single CSO event can be staggering. A study of the Seine River in Paris found that one intense overflow discharged 80 to 100 times the amount of fecal indicator bacteria the river normally receives from treated wastewater plant effluent during dry weather. Sewer sediments stirred up by the floodwaters contributed the majority of those bacteria.8Water Research. Impact of an intense combined sewer overflow event on the microbiological water quality of the Seine River Even though the volume of water released through CSOs is much smaller than what a treatment plant discharges over time, the microbial load in CSO events can far exceed it, especially during summer storms.9Science of The Total Environment. Contributions of combined sewer overflows and treated effluents to the bacterial load released into a coastal area
Cities are addressing the problem through a mix of strategies: building massive underground storage tunnels to hold excess flow until the plant can process it, separating storm and sanitary sewers (expensive and slow), and installing green infrastructure like rain gardens and permeable pavement to reduce the amount of stormwater entering the system in the first place.
The Septic Tank Route
Not everyone is connected to a sewer. Roughly a fifth of U.S. households use septic systems, and the proportion is higher in rural areas worldwide. When you flush in a septic-equipped home, waste flows into a buried tank where solids settle and anaerobic bacteria partially break them down. The liquid portion, called effluent, seeps out through perforated pipes into a drainfield, where it percolates through soil. The soil itself acts as a biological filter: microbes living in the top layers consume remaining organic material and pathogens.
A well-maintained septic system does a reasonable job. Studies of drainfields over permeable rock have found that about 25 to 40% of nitrogen is removed through natural processes as effluent moves through the unsaturated soil to the water table. Most pharmaceutical compounds and organic wastewater contaminants are heavily reduced by the time the water reaches groundwater, though a handful of compounds, including caffeine and the antibiotic sulfamethoxazole, have been detected in groundwater samples beneath drainfields. Indicator bacteria and human viruses appeared in septic effluent but were only intermittently found in the groundwater.10PubMed. Fate of effluent-borne contaminants beneath septic tank drainfields overlying a Karst aquifer Aeration of the drainfield soil can improve performance, reducing nitrogen, oxygen demand, and fecal coliform counts more effectively than conventional unaerated designs.11PubMed. Effects of aeration on water quality from septic system leachfields
The tank itself needs periodic pumping, typically every three to five years, to remove accumulated solids. A neglected septic system can fail in unpleasant ways: sewage backing up into the house, soggy spots and odors in the yard, or contamination of nearby wells.
What Treatment Plants Still Cannot Catch
Conventional treatment was designed to handle organic matter, solids, and pathogens. It was not designed for synthetic chemicals that did not exist when most plants were built. Two categories are getting the most attention right now: PFAS (per- and polyfluoroalkyl substances) and microplastics.
PFAS
PFAS are a family of thousands of fluorinated chemicals used in nonstick coatings, waterproof fabrics, food packaging, and firefighting foam. They are called “forever chemicals” because their carbon-fluorine bonds are extraordinarily stable and resist breakdown. Standard wastewater treatment does almost nothing to remove them. A review of 259 treatment plants found no significant difference between PFAS concentrations in incoming sewage and the treated effluent leaving the plant.12PubMed. A Critical Review of PFAS Analysis, Occurrence, and Fate in Wastewater Treatment Plants Even plants equipped with advanced treatment steps like membrane bioreactors, activated carbon filters, ozonation, and UV disinfection showed no meaningful reduction in PFAS levels, meaning treatment plants themselves become a source of PFAS entering rivers and soil.13PubMed Central. Occurrence, Fate, and Removal of Per- and Polyfluoroalkyl Substances (PFAS) in Small- and Large-Scale Municipal Wastewater Treatment Facilities in the United States The problem extends to biosolids spread on farmland, where PFAS can accumulate in soil and potentially enter the food chain. Regulators are still working out enforceable limits and figuring out which advanced technologies, such as high-pressure membranes or specialized adsorbents, might actually work at scale.
Microplastics
Every load of laundry sheds thousands of tiny synthetic fibers, and personal care products add microbeads and fragments. These microplastics flow into the sewer and arrive at the treatment plant. The good news is that treatment plants are surprisingly effective at trapping them: a study of a major plant in Vancouver found that up to 99% of incoming microplastics were retained, mostly settling into the sludge during primary and secondary treatment.14Marine Pollution Bulletin. Retention of microplastics in a major secondary wastewater treatment plant in Vancouver, Canada The bad news is that concentrating microplastics in sludge just moves the problem. Sewage sludge has become a primary accumulation point, with concentrations ranging from 20,000 to over 228,000 particles per kilogram of dry sludge.15Chemosphere. Microplastics in wastewater and sludge from centralized and decentralized wastewater treatment plants: Effects of treatment systems and microplastic characteristics When that sludge is spread on agricultural land as biosolids, the microplastics go with it.
Flushing as a Public Health Sensor
Here is something most people do not expect: scientists now routinely test sewage to track disease outbreaks. The field is called wastewater-based epidemiology, and it works because people shed viruses and other pathogens in their stool, often before they feel sick or get tested. By sampling raw sewage at treatment plant inlets, researchers can estimate how widely a virus is circulating in a community without relying on individuals to seek medical care or testing.
The technique gained visibility during the COVID-19 pandemic, when SARS-CoV-2 RNA in sewage turned out to be a leading indicator of case surges, rising before clinical case counts did.16PubMed Central. Wastewater-based surveillance as a tool for public health action: SARS-CoV-2 and beyond But the concept extends well beyond one pandemic. Wastewater surveillance is now used to monitor influenza, norovirus, RSV, polio, and even the spread of antibiotic-resistant bacteria. It offers a way to track community health trends cheaply and without relying on anyone to show up at a clinic.17Heliyon. Wastewater surveillance for viral pathogens: A tool for public health Your flush, in other words, contributes to an anonymous but powerful disease-detection system.
Where Sewers Do Not Exist
About 3.6 billion people worldwide lack access to safely managed sanitation. In dense urban slums, the infrastructure for sewer pipes simply is not there, and the terrain or housing density makes installing them impractical. Septic tanks aren’t always feasible either when buildings are packed together without yards for drainfields. One alternative gaining traction is container-based sanitation (CBS), in which households use specially designed toilets that collect waste in sealed containers. Service workers swap full containers for empty ones on a regular schedule, then transport the waste to a treatment facility.
A pilot program in Cap Haitien, Haiti, found that CBS service reduced the share of unmanaged feces in the community by roughly 3.5 times and nearly eliminated reported open defecation and “flying toilets” (bagged waste thrown away) among participating households.18PubMed Central. Container-based sanitation: assessing costs and effectiveness of excreta management in Cap Haitien, Haiti CBS is not a replacement for sewers or treatment plants in places that can build them, but in densely populated low-resource settings, it fills a gap that would otherwise mean human waste going straight into streets and waterways.19H2Open Journal. Container-based sanitation in urban Haiti: how can it improve human rights as a component of citywide inclusive sanitation?
From Toilet to Tap
In water-scarce regions, treated wastewater is increasingly being recycled into drinking water supplies. The concept goes by names like indirect potable reuse or direct potable reuse, depending on whether the treated water passes through an environmental buffer (like a groundwater basin or reservoir) before being drawn back into the drinking water system. Orange County, California, operates one of the most prominent examples: its Advanced Water Purification Facility treats secondary effluent with microfiltration, reverse osmosis, and UV disinfection with hydrogen peroxide, then injects the purified water into groundwater aquifers that supply drinking water wells.20Opflow. Toilet to Tap: Making a Case for Indirect Potable Reuse
The water that comes out of these advanced purification systems routinely meets or exceeds drinking water standards. The bigger obstacle has been psychological rather than technical. “Toilet to tap” was coined as a pejorative by opponents of water reuse projects in the 1990s, and public squeamishness still stalls some proposals. But as drought intensifies in many parts of the world, the practice is spreading. Singapore, Namibia, and parts of Australia and Texas already blend purified wastewater into their drinking supplies.
The Workers Underground
Someone has to maintain the vast networks of pipes, pumping stations, and treatment equipment that make all of this work. Sewer and sanitation workers face a distinctive set of health risks that rarely get public attention. A systematic review and meta-analysis of studies on sanitation workers found consistent evidence of increased risk for gastroenteritis and respiratory conditions, with possible elevated rates of musculoskeletal disorders and mental health problems.21PubMed Central. Occupational health outcomes among sanitation workers: A systematic review and meta-analysis
The specific hazards are varied. Hydrogen sulfide gas, produced naturally when sewage sits in low-oxygen conditions, is one of the most dangerous: at high concentrations it can cause unconsciousness within seconds. Methane, also produced by anaerobic decomposition, creates explosion risks in confined spaces. Bioaerosols, tiny airborne droplets carrying bacteria and viruses, pose respiratory and gastrointestinal infection risks.22Frontiers in Public Health. Systematic Review of Potential Occupational Respiratory Hazards Exposure Among Sewage Workers Beyond gas and biological exposure, sewer workers deal with hepatitis risk from contact with raw sewage, skin conditions from prolonged damp exposure, and the physical toll of working in cramped underground spaces.23PubMed Central. Occupational health hazards in sewage and sanitary workers
Waste Management in Space
The question of where waste goes becomes even more interesting when there is no sewer system, no river to discharge into, and no gravity working in your favor. On the International Space Station, urine is already processed through a water recovery system and recycled into drinking water. But for longer missions, like a trip to Mars, researchers are exploring whether human waste could do more than just get recycled into water. Microbial fuel cells, which use bacteria to break down organic waste and generate small amounts of electricity in the process, are being studied as a way to simultaneously treat sewage, produce power, and create nutrient solutions for growing food in hydroponic systems.24PubMed Central. Microbial fuel cell centric nutrient rebalancing and recycling from human waste in space missions The energy output per unit is modest, but in an environment where every gram of material has to be launched at enormous cost, turning waste into food, water, and electricity simultaneously is not a luxury. It is a design requirement for keeping humans alive far from Earth.