Provided is a water boiler. A shell of the water boiler is provided with a water cavity and a heating device. The water cavity is provided with a drainage opening which is connected with a water pump. The water pump is connected with a water outlet through a water pipe. A cup base is arranged below the water outlet. The cup base is located on one end of a lever. The other end of the lever is located in the shell, and is connected with an electrical control assembly which is arranged inside the shell. The electrical control assembly is used for controlling the opening and the closing of the water pump. The water boiler has the following advantages: due to the fact that the automatic water flowing and the automatic water cutting can be excellently achieved, the water boiler is very convenient; the different water flows are convenient to adjust.