If you notice a sulfurous odor coming from your toilet tank and a hairy, stringy growth at and below the water line, your water may be contaminated with sulfur-reducing bacteria. Green algae can also grow in your tank, especially if you live in a hot, humid climate. Not only that, a pink growth means your tank may be infected by Serratia marcescens bacteria, which can cause urinary tract infections. Algae and pink bacteria are tenacious, but you can control them with chlorine bleach. To kill sulfur-reducing bacteria, though, it's best to treat the tank with an acid.

...
...
credit: Jessica Shaw/Demand Media

Turn off the water to the toilet and flush to empty the tank. Sponge all the water out of the tank and transfer it to the bowl.

...
credit: Jessica Shaw/Demand Media

Put on rubber gloves, goggles and a mask. Spray the sides of the tank with full-strength chlorine bleach, and scrub them with a toilet brush. Keep the bathroom well ventilated while you do this.

...

Turn the water on; let the tank fill, and flush. When the tank fills again, pour a cup of chlorine bleach in the water; let it sit for 10 to 15 minutes, and then flush. If your tank was contaminated by green algae or pink bacteria, you are finished. If sulfur-reducing bacteria are growing there, perform an additional treatment with muriatic acid or white vinegar.

...

Fill the tank about half full with water, and then fill it to the overflow line with muriatic acid. Put the lid on the tank. Let the acid sit for about 15 minutes,and then flush 10 to 20 times over the course of an hour to dilute the acid in the drainpipes. Be sure you're wearing your rubber gloves, goggles and respirator.