That rotten egg smell hits the second you turn on the hot tap. It is gross, a little embarrassing, and enough to make you skip your shower. When the stink shows up only in hot water, the source is almost always sitting inside your water heater.
The good news is that the odor is rarely a sign of unsafe water. It comes from a chemical reaction between bacteria in your water supply and the metal anode rod inside the tank, and you can fix it at home.
This guide explains why your water smells like sulfur, walks through three ways to clear it, and shows which permanent fix actually keeps it from coming back.
Key Takeaways
- The rotten egg smell is hydrogen sulfide gas, produced when sulfur bacteria react with the magnesium anode rod inside your water heater.
- It is most common with well water or a water softener, since softened water speeds up how fast the magnesium rod corrodes.
- Swapping the magnesium rod for an aluminum-zinc alloy or a powered anode rod is the most reliable permanent fix.
- Flushing the tank with hydrogen peroxide or bleach kills the bacteria for a while, but the smell returns unless you also change the rod.
Why Your Hot Water Smells Like Rotten Eggs
If the smell is in both your hot and cold water, the problem is your water source, such as a well. If it shows up only when you run the hot tap, the reaction is happening inside your water heater tank. A faint rotten egg smell in hot water is often the first sign that an aging anode rod is overdue for service.
That smell is hydrogen sulfide gas. It forms from a reaction between two things: sulfur bacteria in the water and the sacrificial anode rod inside your heater.
The Role of Sulfur Bacteria
Sulfur bacteria occur naturally and are generally harmless to your health, but they thrive in warm water. Your heater tank acts like an incubator, letting the bacteria multiply quickly.
As they feed on sulfur in the water, the bacteria release hydrogen sulfide gas. That gas is what produces the signature rotten egg stench.
The Anode Rod Reaction
The anode rod protects your water heater from rust. It is made of a metal, usually magnesium, that corrodes faster than steel, so the rod sacrifices itself instead of the tank lining.
The trouble starts when sulfur bacteria are present. As a magnesium rod breaks down, it releases free electrons that help convert sulfate in the water into hydrogen sulfide gas, which ramps up the odor. That is why swapping the rod is usually the only way to stop the smell for good.
Do not simply pull the rod out to end the reaction. Running a heater with the anode removed shortens the life of the glass-lined tank and voids most warranties, so the rod must be replaced, not deleted.
Is Sulfur Smelling Water Harmful?
When you catch that sulfur whiff, your first thought is probably that the water is toxic. In most homes it is not. Sulfur bacteria and the hydrogen sulfide gas they produce are generally harmless at the low levels found in residential water. Most people can smell hydrogen sulfide at just 0.5 to 1.0 mg/L, well below any level that would threaten health, so your nose notices it long before it becomes a concern (1).
You can shower, wash your hands, and clean dishes without worrying about getting sick. The EPA sets no health-based limit for hydrogen sulfide in drinking water, because any amount high enough to be dangerous would make the water impossible to drink first. Even so, the gas creates real nuisances:
- Pipe corrosion: Hydrogen sulfide corrodes metals and can damage plumbing over time.
- Staining: It can tarnish silverware and leave black or yellow stains on laundry and fixtures.
- Slime buildup: Sulfur bacteria produce a slime that can clog pipes and shelter other bacteria.
One rare exception is worth knowing. In a small, enclosed space, hydrogen sulfide off-gassing from water can in theory build to unsafe or flammable levels, so keep the area ventilated when you drain or flush the tank.
How to Fix the Rotten Egg Smell
You have three practical options. You can replace the anode rod for a permanent fix, sanitize the tank as a reset that buys time, or raise the temperature to cook off the bacteria without any parts. Start with the rod if you can, since the other two only hold until the bacteria return.
1. Check and Replace the Anode Rod
If you have a standard magnesium rod, replacing it is the most effective solution. You have three material options for the replacement:
- Aluminum-zinc alloy: The go-to choice for fighting odor. The zinc counteracts the sulfur smell, and it is usually the best affordable upgrade for smelly water.
- Powered anode rod: The strongest fix. It uses a low electrical current to stop corrosion instead of a degrading metal, so there is no reaction to feed the bacteria. It costs more but lasts for decades.
- Aluminum: Aluminum rods corrode slower than magnesium and react less, but they fight the smell less effectively than a zinc alloy or powered rod.
To reach the rod, turn off the power or gas to the unit, drain part of the tank to relieve pressure, and use a socket wrench (usually 1 1/16 inch) to loosen the hex head on top of the tank.
Safety Warning
2. Flush the Tank With Hydrogen Peroxide
If you cannot replace the rod right away, or the smell lingers after you do, sanitize the tank to kill the bacteria colony. Hydrogen peroxide is a safe, effective choice. Household chlorine bleach is a manufacturer-approved alternative that works the same way; use one or the other, never mix the two.
Step 1: Shut Off the System
Turn off the electricity at the breaker or the gas valve. Close the cold water inlet valve that feeds the tank.
Step 2: Drain Some Water
Open a nearby hot water faucet to prevent a vacuum. Attach a hose to the drain valve at the bottom of the heater and drain a few gallons to make room for the peroxide.
Step 3: Add Hydrogen Peroxide
Remove the anode rod or the T&P valve to gain access to the tank. Pour in 3% hydrogen peroxide, using one to two pints for every 40 gallons of tank capacity.
Step 4: Refill and Wait
Reconnect the valve or rod. Turn the cold water inlet back on to fill the tank, but leave the power or gas off. Let the mixture sit for two to three hours.
Step 5: Flush and Finish
Open the drain valve again and check that the water runs clear. Turn on the hot taps around your home and let them run until the air is purged and the chemical smell is gone. Once the tank is full of fresh water, turn the power or gas back on.
3. Raise the Temperature to Disinfect
Sulfur bacteria die off at about 140 degrees Fahrenheit. If you would rather not open the tank, turn the thermostat up to 160 degrees for several hours, or hold it at 140 degrees for roughly eight hours, then flush the tank to clear out the dead bacteria and gas.
Treat this one carefully. Water at 140 degrees or hotter scalds skin in seconds, so keep everyone away from the taps during treatment and turn the thermostat back down to a safe 120 degrees the moment you finish. Like a peroxide flush, it only buys time; without an anode swap, the bacteria come back.
Can You Prevent the Smell From Returning?
Prevention comes down to your water chemistry. If you have well water or a water softener, the smell will likely return as long as a standard magnesium rod is in the tank. Softeners make it worse for a specific reason: softened water speeds up how fast the magnesium rod corrodes, which feeds the bacteria even more hydrogen sulfide.
The steps that actually keep the odor away:
- Upgrade the rod: Switch to an aluminum-zinc or powered anode rod, the single most effective long-term move.
- Inspect the rod on schedule: Check the anode every one to three years, and sooner with hard water or a softener, replacing it once it is heavily corroded.
- Flush regularly: Drain and flush the tank every 6 to 12 months to clear sediment and bacteria before they build up.
- Treat the source: If the smell comes from well water, a whole-home chlorination or filtration system can treat it before it reaches the tank.
FAQs
In Summary
A shower that smells like a swamp is a rough way to start the day, but the rotten egg smell is almost always a fixable reaction between common water bacteria and your heater’s magnesium rod.
For fast relief, sanitize the tank with hydrogen peroxide or briefly raise the temperature to kill the bacteria. For a lasting fix, replace that magnesium rod with an aluminum-zinc alloy or a powered anode rod. Do that, and you are back to fresh, clean hot water for good.












