To improve the energy efficiency in water electrolysis reaction, to realize the miniaturization, simplification and reduction of the cost in the generator, and to obtain stable water quality for a long time.
The generator is provided with: a thermal pure water feed means of feeding thermal pure water; an electrolysis means of electrolyzing the thermal pure water and generating gaseous hydrogen and gaseous oxygen; a temperature control means of controlling the temperature of the thermal pure water; and a thermal pure water refinement means of refining the thermal pure water by removing ions in the thermal pure water using an anion exchange resin having a constitution unit expressed by general formula (1), and a cation exchange resin having the degree of crosslinking of ≥8 mol% {in the general formula (1), A denotes a 3 to 8C straight chain or branched alkylene group, or a 4 to 8C alkylene oxymethylene group bonded to a benzene ring in a methylene group; R1, R2 and R3 respectively individually denote a ≤6C alkyl group or hydroxyalkyl group; and X- denotes a counterpart anion}.