A rotten-egg smell in water usually comes from hydrogen sulfide gas, and it can come from the source water, from bacteria living in the pipes or water heater, or from a chemical reaction inside the heater itself. The fix depends on which one you have, so the first job is narrowing it down. You can do most of that with a notebook and a few minutes at the taps.
Run each tap and smell it
Start with the cold tap in the kitchen, run it for about a minute, and smell the water in the glass. Then do the same at the hot tap. Repeat at one bathroom sink and the outside spigot if you have one. Write down which taps smell, whether it is hot only, cold only, or both, and whether the smell is strong at first and fades, or stays the same.
What the pattern points to
A smell only in the hot water often points to the water heater, where bacteria or a reaction with the anode rod can produce the gas. A smell in both hot and cold usually points back to the supply, which for a private well means the source or the well itself, and for a city supply means something upstream of your home. A smell that appears after the house has sat unused for a while, such as after a long trip, often means stagnant water in the lines or heater.
These are patterns, not verdicts. Two causes can overlap, and a smell from the water heater can be mixed with a smell from the supply. That is why a test matters more than a guess.
Ask the right question before you buy
If the smell is in both taps and you are on a private well, the next step is a water test from a state-certified or accredited lab, not a filter. A test tells you whether sulfide, bacteria, iron or something else is present and at what level, and that result decides which equipment is worth comparing. If you are on city water, ask the utility for its most recent water quality report and whether it has had odor complaints in your area. Ask the utility or the lab what sample they need and how to collect it, so the result reflects your home and not a clean bottle filled at the kitchen sink.
If the smell is hot-only, ask a plumber to check the water heater and anode rod before you spend money on any treatment. Ask them what they found, what they changed, and what they expect the smell to do afterward. Write the answers down.
When to stop and get it tested first
If the water looks cloudy, tastes wrong beyond the smell, or anyone in the home has concerns about drinking it, stop using it for drinking and cooking until a lab result comes back. Do not rely on a carbon filter or a store-bought test strip to make the decision for you. Those tools answer narrower questions than a lab test does.
For a broader view of how providers are rated before you compare, see How We Rate Water Treatment Providers.