The present invention provides a gas generator, an electrolysis device, for containing electrolyzed water and electrolyzing the electrolyzed water to generate a hydrogen-oxygen mixed gas; and a condense filter (6) coupled to the electrolysis device and used to filter impurities of the hydrogen-oxygen mixed gas, wherein the condense filter has a gas inlet via and a gas outlet via, the gas inlet via is coupled to the electrolysis device for receiving the hydrogen-oxygen mixed gas, and the gas outlet via is used to output the filtered hydrogen-oxygen mixed gas; wherein, the gas outlet via of the condense filter is capable to receive recharged water to flush the impurities back to the electrolysis device through the gas inlet via.