Cementitious grout is porous – it can absorb a stain. Looked at under a microscope, there is a large surface area to absorb stains. For this reason, many owners choose to seal their grout – usually the better the sealer, the more the grout joint is protected. Even better, if epoxy grout is used, it is virtually as stain proof as the tile.
Removing stains from cementitious grout is similar to removing stains from clothing. The same cleaners you might use on clothes to get out a stain should also work on grout.
Keep in mind though, that grout is based primarily of cement and sand. Sand, like glass, is unaffected chemically by most cleaners. Cement is not – rather it is alkaline based and is dissolved by acids. As baking soda and vinegar react, so do grout and vinegar.
Accordingly, it is better to clean grout with an alkaline cleaner (Spic and Span, Mr. Clean, etc.) than an acid based cleaner. There are also specialty cleaners available at most tile retailers that are designed for tile and grout. There are also cleaners with enzymes that attack stains similar to enzyme pre-soaks for laundry.
The same cleaner that works on the grout generally will work well on the tile. In fact, since the tile is usually so easy to clean, the tile can often be cleaned with water.
Just a few more important points: As the grout can absorb the soap as well as a stain, do not clean with oil or wax based cleaners (Murphy’s Oil soap, Pine Sol, etc.). These products will leave a waxy or oily film in the grout. Even good alkaline cleaners, if not properly rinsed, will leave a sticky soap film. This usually attracts dirt. In fact, truly clean ceramic tile without any sticky soap film will stay very clean as tile does not tend to hold an electrostatic charge (which can attract some kinds of dirt).
The absolutely best way to clean grout is to apply the cleaner and then vacuum (“shop vac”) up the dirty water. This lifts the dirt off the joint. Apply rinse water and vacuum that water up. This lifts off any remaining soap film.
Just to mention it, there are tile installers that remove very stubborn stains on grout with an acid (like straight vinegar or a stronger acid). There they have elected to dissolve the top layer of grout molecules so the stain is no longer attached to anything. While this works, it is not recommended by the grout manufacturers – needing to regrout is sometimes the result. Also, extreme care should be used when handling any acids.
Should you be unable to get your grout clean through conventional methods, you may also want to try steam. Some stains that do not respond to conventional cleaners will come clean when subjected to pressurized steam. As a last resort, some installers elect to cut out the grout and regrout. This is possible although care must be taken to not damage or loosen the tile. Generally it is not possible to grout directly over the old grout without cutting the old grout out. The same contaminants that made the old grout dirty may prevent new grout from sticking properly.
Source: The Tile Council of North America