A water separator for continuous separation of water, air and particles includes an inlet pipe, an outlet pipe, an upper chamber connected with a lower chamber, and a three-way valve located in an air connection pipe being adapted to establish a connection between the upper and lower chambers in a first position and closing the connection to the upper chamber and allowing atmospheric air to enter into the lower chamber in a second position. The upper chamber includes a coarse filter capturing particles from the liquid flow to the lower chamber. The water separator includes a main tank and a safety tank, which are connected through a connection pipe from the upper chamber in the main tank to the safety tank and through the air connection pipe from the lower chamber in the main tank to the safety tank. The inlet pipe is through the lid of the main tank.