this was baby hats but could work for bigger ones - https://www.charlestoncrafted.com/2018/10/10/baby-hat-organization/
How many do you have? Mine are all in hatboxes. Hanging for any length of time they can become out of shape as well as dusty.
I have around 10..I have in a box too..but I want to hang it..
You could hang hooks on the walls or the back of the door to hang hats