Laundry hampers, especially those with a lid, can begin to smell like dirty socks even when the hamper is empty. If it is made of a material that can get wet, use hot water and baking soda to scrub it down and leave outside to air and dry. If you have a wooden or woven hamper that shouldn’t get wet, take it outside to air, then place a container of baking soda inside and close the lid overnight.
If you are smelling a musty, mildew odor, then you must use a disinfectant like chlorine bleach or pine sol to kill the mold that is causing the odor. This is very important because mold can destroy your clothes. Any questions? Just ask here.