Gather laundry detergent and baking soda or vinegar, and grab your jeans.
Fill the washing machine as you normally do. Put the jeans in your regular load of laundry. Measure and add your favorite detergent to the water.
Add 1 cup of white distilled vinegar or 1 cup of baking soda to the water. Let the washing machine start its wash cycle.
Stop the machine once the detergent and vinegar or baking soda are thoroughly mixed with the water.
Allow the load of laundry to soak for an hour. Let the laundry soak longer if you have time.
Restart the washing machine. Let the cycle finish.
Remove your jeans from the machine. Smell the jeans to make sure the odor is gone. Repeat the steps above when you still smell mildew.
Dry your jeans normally when the smell of mildew is completely gone.