dish washer. you can also get cleaner kits from hat stores that will have cleaning solution, scrub brush and waterproofing spray. that works well but it takes longer.
if your worried about it shrinking let it air dry and periodically put the hat on your head as it is drying to help keep it stretched out.