Tools & Chemicals:
Laundry pre-treat or laundry soap.
Baseball caps are easy just pre-spray the headband with laundry pre treat or use liquid laundry soap and rub it on the head band and throw in the wash with your laundry. The trick is to be sure to take it out right after the rinse.
Reshape the hat and let air dry. Do NOT dry in the dryer this will damage the hat for sure. If you have a hat you are really fond of and want to be even more careful you can buy a product which is designed to go into the dishwasher (it is a rubberized steel rack the shape of a baseball cap) and you can wash the cap in the dishwasher using dishwasher soap on the delicate cycle, again air drying once the rinse is finished.