hhmmm...Ive washed the inside of a hat with a little bit of laundry detergent in the sink and tried not to get the bill wet, that worked ok, i guess you could febreeze it.
j/k if its white maybe a toothbrush and some clorox/water solution
i tried top rack of the dishwasher but it shrunk my new era SF hat (didnt do the dry cycle, had that off). maybe fabrese and let it sit to dry somewhere