Machine for the production of liquid, semi-liquid or pasty solid food products, such as in particular ice creams or similar cold food products, comprising a working container provided with an internal stirrer, an inlet opening in fluid communication with means for feeding a base food mixture into said container, a first outlet opening for a finished food product and a second outlet opening for a washing liquid, heat exchange means arranged on the outside of said container and able to exchange heat with said container and a washing device, characterized in that the washing device comprises: - at least one washing liquid inlet pipe (28,30) in fluid communication with said means for feeding the base mixture into said container; - at least one washing liquid discharge pipe (32,33,34) connected to said second outlet opening of the container and in fluid communication with the outside of the machine; - a discharge valve in fluid communication with said second outlet opening of the container and said at least one discharge opening (32,33,34); - a circuit for recirculating the washing liquid comprising a recirculation pipe connected to said at least one inlet pipe (28;30) and to said at least one discharge pipe (32,33,34), and a recirculating pump in fluid communication with said at least one recirculation pipe, - a command and control unit in two-way electrical communication with at least said discharge valve and said recirculating pump, said command and control unit being able to close said discharge valve and keep in the stopped position or stop said recirculating pump for a first predetermined time period during which said container is subjected to a first washing cycle and being able to open said discharge valve and switch said recirculating pump into an operating position for a second predetermined time period during which said feeding means and said container are subjected to a second washing cycle by means of recirculation of a washing liquid inside said recirculation circuit. - at least one washing liquid inlet pipe (28,30) in fluid communication with said means for feeding the base mixture into said container; - at least one washing liquid discharge pipe (32,33,34) connected to said second outlet opening of the container and in fluid communication with the outside of the machine; - a discharge valve in fluid communication with said second outlet opening of the container and said at least one discharge opening (32,33,34); - a circuit for recirculating the washing liquid comprising a recirculation pipe connected to said at least one inlet pipe (28;30) and to said at least one discharge pipe (32,33,34), and a recirculating pump in fluid communication with said at least one recirculation pipe, - a command and control unit in two-way electrical communication with at least said discharge valve and said recirculating pump, said command and control unit being able to close said discharge valve and keep in the stopped position or stop said recirculating pump for a first predetermined time period during which said container is subjected to a first washing cycle and being able to open said discharge valve and switch said recirculating pump into an operating position for a second predetermined time period during which said feeding means and said container are subjected to a second washing cycle by means of recirculation of a washing liquid inside said recirculation circuit.