A filter (1) to purify the water distributed by a dispenser, fitted with a special sanitizing device incorporated therein. Inside of the said filter (1), below the water chamber (3), is a disinfectant chamber (4) that contains the solution designed to sanitize the said dispenser. A mechanism causes the sanitizing solution to flow into the water chamber (3) of the filter (1) and into the piping, for performing the subsequent sanitizing action.