A humidifier includes a float (4) positioned at a water outlet of a water tank (2), and a body (1) containing a water level sensor (12) functioning with the float rising and falling with the level of the water in a water chamber in the body to drive the water level sensor in case of the water level falling to the lowest to turn off the humidifier. Then the water tank is simplified in its structure and making the humidifier safe to use. <IMAGE>