A washing machine that has an odor probably needs to be cleaned. You can clean your machine in a variety of different ways, some of which include the use of hot water, chlorine bleach, or vinegar. Baking soda also tends to be useful for taking care of a smelly washing machine. The method you use for cleaning your machine might vary slightly depending on whether you have a top- or front-loading washer. There are additionally some steps you can take during your regular clothes washing routine to reduce the likelihood that your washing machine will develop an odor in the future.
If you have a smelly washing machine that is top-loading, you may be able to get rid of the smell by running a cycle in hot water without clothes. You can add a little bit of chlorine bleach to the water before you begin the cycle. If you don't like using chlorine bleach for cleaning, a few cups of white distilled vinegar and a small amount of baking soda should work well as a substitute. Once the cycle is finished running, carefully wipe out the machine with a dry rag to get rid of any leftover soap scum. It's also a good idea to remove the lint filter inside your washer and clean it out in the same manner you would the lint filter in your dryer.
A smelly washing machine that is front-loading requires a few different steps for proper cleaning. You should fill the machine up with hot water and add a little bit of chlorine bleach to the dispenser tray. If you don't want to use chlorine bleach, you can put some white distilled vinegar mixed up with regular laundry detergent inside the dispenser instead. Let the washer run through a full cycle and then wipe out the inside with a dry rag dipped in some type of cleaning solution. You may also want to clean under the rubber sill around the door to make sure no dirt and debris are trapped inside that may be causing the odor.
You should be much less likely to have problems with a smelly washing machine if you use hot water every other wash instead of cold water. It is advisable to limit hot water use for the purpose of saving energy, but using it occasionally might not be a bad idea because hot is more effective than cold for dissolving grime. You should also add either a little bit of vinegar or a small amount of chlorine bleach to every other wash. These substances will help keep bacteria and mildew from developing inside your machine and should also help with odor neutralization.