Are you familiar with the felting process?? If not, what you do is put your item in a washing machine with HOT water along with a few pairs of old jeans and let it go, watching closely so it doesn’t shrink too much. I would not recommend you doing a full-felting on your hat, but you might get good results from lightly felting it, and by this I mean maaaaybe a few minutes in the washer but no more than that. It also depends on your washer, how hot your water is, and how big the item is, but I’ve gotten good results shrinking items slightly using this method.
Just a note that this will only work is your item was knit with a natural fiber. Acrylic, cotton, etc. do not felt. It’s it’s 100% wool it will.