If you have rust in the toilet tank, it doesn't mean your tank is rusting. That would be impossible since the tank is made of porcelain. Some of the metal components of the toilet's flush and fill system could be rusting, but that isn't the most common cause. The far more likely culprit is either iron in your water supply or corrosion from your plumbing pipes.
Rust is iron oxide, and while it generally isn't a health hazard, it's definitely a stain hazard. It binds with porcelain and glass, and while it doesn't corrode these materials as it does metal, it creates hard-to-remove discoloration that just gets worse the longer you leave it. Fortunately, there's a simple and safe way to get the stains out of your toilet tank, but they'll just come back if you don't address the source of the iron.
Video of the Day
Rust in a toilet tank is typically caused by iron in the water supply or corrosion from galvanized pipes.
Iron in the Water Supply
Far and away, the most common cause of brown discoloration and rust in a toilet tank is iron in the water supply. Iron concentrations in groundwater vary, but if you have trouble with frequent calcium deposits, you can be fairly certain your water supply also contains iron. If so, you've probably noticed brown discoloration in one or more sinks just under the faucet spout, under the tub faucet, and on the shower floor.
Although iron oxide isn't a health risk, it does give water a metallic taste, and the brown coloration isn't very appealing either. If your water is high in iron and other minerals, consider installing a water softener. Not only will it clear out the iron but it will reduce calcium sediment in your water heater and reduce the time you spend cleaning hard water stains from sinks, faucets, and shower doors.
Rust From Galvanized Pipes
Another common source of iron oxide is corrosion from inside galvanized steel pipes. These pipes haven't been installed in new homes since the mid to late 20th century, but many older homes have them. They are problematic because they corrode, and the corrosion can do much more than deposit rust in your toilet water. It can restrict water flow, so if you notice low flow from faucets in the bathroom, the pipes are probably responsible.
There's no easy fix for rusted galvanized pipes other than to replace them with copper, CPVC, or PEX pipes. If only one bathroom is affected by the rust problem, you may be able to get away with replacing only the pipes for that bathroom. However, if your whole house is plumbed with galvanized steel, you should replace all of them, not just the ones that you suspect are corroding. Corrosion will eventually affect the other pipes, and they could start to leak.
How to Clean a Rusty Tank
Fortunately, it's fairly easy to clean rust from a toilet tank, and all you need to do the job is a gallon or two of white distilled vinegar, which is a natural toilet tank cleaner. Turn off the water supply and flush just enough to empty the tank halfway. Then, refill the tank with vinegar. Let the solution sit for a few hours or overnight and then turn on the water and flush a few times to get rid of the vinegar. If you're on a septic system, don't worry, as vinegar is septic-safe.
One thing you shouldn't do is to try to clean the rust with bleach or any bathroom cleaner that contains bleach. Bleach will just fix the stains and make them harder to remove. If you want something to use for scrubbing, try dish soap or a paste made with borax and vinegar.