Now, a true hat head will advise you to never wash your hat in a washing machine. It will deform your hat, maybe shrink it overall, we recommend staying old school with it and clean your snapback hat by hand.
Mix a concoction of warm water and laundry detergent in a bowl. You can use a washcloth to dip in bowl. Then wipe the Cap inside and out. Make sure you lightly wipe. Keep washing until clean. When it reaches your clean satisfaction levels. Rinse the hat under cool running water to remove any soap residue, then blot the hat with a towel until dry.
It pays off to allow the hat to dry off on a head shaped item.