Most Likely Causes (Ranked)

The magnesium anode rod corrodes sacrificially to protect the steel tank from rust. But when sulfate-reducing bacteria (present in virtually all water supplies) encounter the corroding magnesium, they produce hydrogen sulfide gas — the classic rotten egg smell. The warm, oxygen-depleted tank interior is a perfect breeding ground. This accounts for over 80% of water heater odor complaints.

Minerals and debris settle at the bottom of the tank over time, creating a layer of sediment that traps bacteria and organic material. This sediment layer becomes an incubator for sulfate-reducing bacteria, compounding the anode rod reaction. Sediment also reduces heating efficiency and can cause popping or rumbling noises.

Sulfate-reducing bacteria thrive between 68°F and 113°F. If your water heater is set below 120°F, you're keeping the water in the bacteria's optimal growth range. Some people lower the temperature to save energy or prevent scalding, inadvertently creating a bacterial incubator.

If both hot and cold water smell, the issue is upstream of the water heater — in your well system, pressure tank, or municipal supply. High sulfate or hydrogen sulfide levels in the source water will make any water heater smell, regardless of anode rod type.
How to Fix It
Flush the Water Heater
$0Start here — this removes sediment and bacteria, and is free. Takes 20 minutes.
- 1Turn off the water heater. Gas: set the gas valve to "pilot." Electric: turn off the breaker.
- 2Connect a garden hose to the drain valve at the bottom of the tank. Route the hose outside or to a floor drain.
- 3Open the drain valve and let water flow until it runs clear (usually 5-15 minutes). Open a hot water faucet upstairs to allow air in and improve flow.
- 4For stubborn sediment, briefly open and close the cold water inlet valve several times to stir up remaining sediment.
- 5Close the drain valve, remove the hose, and refill the tank. Turn the heater back on. Check for leaks at the drain valve.
Replace the Anode Rod (Permanent Fix)
$20-40 DIY / $150-300 proThis is the long-term solution. Swap the magnesium rod for aluminum/zinc to stop the reaction permanently.
- 1Turn off the water heater and close the cold water inlet valve.
- 2Locate the anode rod — it's a hex-head fitting on top of the water heater (1-1/16" socket). You'll need a socket wrench with a breaker bar because these are very tight.
- 3Remove the old rod. If it's heavily corroded (rough, pitted, thinner than 1/2"), it was due for replacement anyway — they last 3-6 years.
- 4Install a new aluminum/zinc combo anode rod ($20-40 at hardware stores). These provide the same tank corrosion protection but produce far less hydrogen sulfide.
- 5If ceiling height is limited, buy a flexible/segmented anode rod that bends during installation.
- 6Refill the tank, turn on the heater, and the smell should be gone within 24 hours.
Shock Treat with Hydrogen Peroxide
$5-10If you want to kill bacteria immediately while keeping the current anode rod temporarily.
- 1Turn off the water heater and close the cold water inlet.
- 2Open a hot water faucet to relieve pressure, then disconnect the cold water inlet pipe at the top of the heater.
- 3Pour 1-2 quarts of 3% hydrogen peroxide into the tank through the opening.
- 4Reconnect the cold water line, fill the tank, and let it sit for 2 hours.
- 5Run hot water at each faucet until you no longer smell peroxide (usually 2-3 minutes per faucet).
- 6Turn the heater back on. Note: if you don't replace the anode rod, the smell will return within weeks as bacteria re-establish.
Raise the Temperature to 140°F (Temporary)
$0A quick kill step that destroys existing bacteria in the tank.
- 1Raise the water heater thermostat to 140°F for 8 hours. This temperature kills sulfate-reducing bacteria.
- 2CAUTION: Water at 140°F causes scalding in seconds. Do not use hot water during this treatment, especially with children in the home.
- 3After 8 hours, lower the temperature back to 120°F (the recommended safe setting).
- 4Flush the tank to remove dead bacteria and sediment.
- 5This is a temporary fix — bacteria will re-establish from the incoming water supply within weeks unless the anode rod is also changed.
When to Call a Professional
Both hot and cold water smell — the problem is in your water supply, not the heater. Get a water quality test ($20-50) to identify the issue.
The water has a brownish tint along with the smell — this may indicate a corroded tank interior or failing anode rod. If the tank is over 10 years old, it may be approaching end of life.
You hear loud banging or popping from the tank — heavy sediment buildup can cause overheating at the tank bottom. Flush the tank promptly to prevent damage.
Water heater is leaking from the base — this indicates tank corrosion and the heater needs replacement, not repair. A leaking tank cannot be fixed.
The smell is present only at one faucet — localized smell suggests bacteria in a short section of pipe near that fixture, not the water heater.
How to Prevent It
Flush the water heater every 6-12 months — removes sediment that bacteria feed on. Takes 15 minutes.
Keep the temperature at 120°F minimum — below 120°F encourages bacterial growth. 120°F balances safety and bacteria control.
Replace the anode rod every 3-5 years — don't wait for the smell. Use aluminum/zinc rods proactively.
Don't leave the heater off for extended periods — if leaving for vacation, keep the heater on "vacation" mode (low) rather than fully off.
Consider a powered anode rod — electronic anode rods ($80-150) protect the tank without corroding, eliminating the bacterial reaction entirely.
Powered Anode Rods: The Premium Solution
If you're tired of replacing anode rods and dealing with recurring smells, a powered (electronic) anode rod is the permanent solution. Brands like Corro-Protec ($80-150) use a small electrical current to protect the tank from corrosion instead of a sacrificial metal rod. Since there's no magnesium or aluminum corroding, there's no chemical reaction to produce hydrogen sulfide.
Powered anode rods never need replacement (they last the life of the water heater), eliminate sulfur smell permanently, and actually provide better corrosion protection than traditional rods. Installation is identical to replacing a standard anode rod — just plug the wire into a nearby outlet.
The upfront cost is higher ($80-150 vs. $20-40 for a traditional rod), but since you never need to replace it again, the lifetime cost is actually lower for anyone who would have replaced traditional rods multiple times.
Frequently Asked Questions
Every 3-5 years for standard magnesium rods, though this varies with water chemistry. Hard water and water with high mineral content corrodes rods faster. Pull the rod out and inspect it — if it's less than 1/2 inch thick or has a rough, heavily corroded surface, it needs replacement. Aluminum/zinc rods last slightly longer than pure magnesium.
Technically yes, and the smell would stop immediately. But the anode rod protects your tank from corrosion — without it, the tank itself begins to rust and will fail prematurely. Removing the anode rod can void the warranty and reduce tank life from 10-15 years to 3-5 years. Replace the rod with an aluminum/zinc version instead.
At the concentrations typically found in residential water heaters (under 5 mg/L), hydrogen sulfide is not a health hazard. It's an aesthetic issue — the smell is unpleasant but the water is safe to drink and use. Very high concentrations (extremely rare) can cause nausea, but you'd find the smell intolerable long before reaching harmful levels.
Tankless (on-demand) water heaters rarely develop the sulfur smell because they don't store water. If your tankless unit smells, the issue is in the incoming water supply, not the heater itself. Get a water quality test. If the smell is only when hot water runs, there may be bacteria in the pipes between the heater and the fixture.