The answer to 'dehumidifier smells bad' is that a smelly dehumidifier is usually caused by mold or mildew buildup inside the unit. This can happen if the dehumidifier is not cleaned and maintained regularly. Symptoms include a musty, unpleasant odor coming from the dehumidifier.
To fix a smelly dehumidifier, you'll need to clean it thoroughly. Start by unplugging the unit and removing the water tank. Wash the tank with warm, soapy water and let it dry completely. Then use a dehumidifier cleaning solution or a mix of vinegar and water to wipe down the inside of the unit, including the coils and fan. Allow it to fully air dry before reassembling and turning it back on.