Over time, a nylon flag becomes dirty when displayed outdoors. According to About.com, the U.S. Flag Code does not prohibit washing a flag. Periodic washing helps to prolong the time a flag can be used.
Examine the flag
Before placing the flag in the washing machine, take the time to examine it for spots. Spray any spots with a laundry solvent approved for use on nylon. If there are several stains, fill the washing machine with water, and add oxygen bleach to soak the flag a few hours before washing.
Use gentle care
The flag has bright colors that may bleed if subjected to warm or hot water. Avoid using harsh cleaners or chlorine bleach that could damage the flag. Choose the delicate cycle on the washing machine, or hand wash the flag
Do not machine-dry a nylon flag. It should be almost dry once it finishes the spin cycle. Lay several clean, light colored towels on a flat surface where the flag is safe. Spread the flag on the towels, and allow time for drying.
If the flag has minor damage, make any necessary repairs. If the flag has suffered too much damage, dispose of it in an approved manner, and replace it with a new one.