The present invention provides a gas generator and comprises an electrolytic cell, a condensate filter device, and an atomizing device. The electrolytic cell is for electrolyzing electrolyzed water to generate a gas with hydrogen. The condensate filter device includes a gas pathway, a filter, and an isolated component. The isolated component is used for limiting the movement of the filter inside the gas pathway. The gas generated from the electrolytic cell is condensed and filtered through the filter for generating a filtered gas with hydrogen. The atomizing device is used for generating an atomizing gas to be mixed with the filtered gas to generate a healthy gas. The present invention uses the condensate filter device to filter out the electrolyte from the filtered gas with hydrogen to be mixed with the atomizing gas for generating the healthy gas.