You depend on your washing machine to get your clothes clean. If you don't keep the inside of your machine clean, it won't clean your clothing effectively. Mildew and soap scum can accumulate, and that's what you'll be washing your laundry with if it's not kept clean.

Man Doing Chores
credit: antonio arcos aka fotonstudio photography/Moment/GettyImages
How to Clean a Washing Machine

Start With the Gasket and Door Seals

Soak some towels with white vinegar or hydrogen peroxide. Pack the cavities of the gasket with the towels so the vinegar or peroxide can loosen up any grease or mold, and let them sit for about an hour. Doing this will also disinfect your washing machine. For a thorough cleaning, you can use a toothbrush to scrub off any residue and then wipe the door seals and gasket clean.

Getting Rid of Residue

Most new top-load and all front-loading washing machines usually have an automatic soap dispenser. If yours does, you should clean it out occasionally to prevent soap from building up. Soap buildup can lead to mildew and a bad odor. Another tip is to leave your soap dispenser open while not in use to provide more air circulation.

Additionally, be sure to always use the proper amount of detergent to reduce residue. The caps on laundry detergent bottles usually have a fill line. If not, you can check the back of the bottle for the appropriate amount you should use, which will vary depending on the size of your load of laundry.

Sanitize Your Washer

Start by setting the washing machine to the largest load, hottest temperature and longest cycle. You can use either vinegar or bleach. The amount you choose is up to you, but on average it's ideal to use about two cups of either solution. If you use vinegar, opt for one that's 6 percent acid. Add the chosen solution to the detergent dispenser and run the washer through an entire cycle.

Once the cycle is done, run it through another cycle at the hottest temperature and highest level again, but this time add one-half cup baking soda to the drum. Once the cycle is complete, wipe the inside drum and the front of the machine with a microfiber cloth. This process will help with mold, mold spores, mildew smell and soap scum. Additionally, you'll make your washing machine fresh again so you can get your clothes as clean as possible. This process should be repeated every couple or few months.