A hydrogen generator of the invention includes: a reformer for generating
a hydrogen-rich gas from a feed gas and water by a reaction using a
reforming catalyst body and sending it out from an outlet port; a
material feed system for feeding the feed gas to the reformer; a burner
for supplying, to the reforming catalyst body, heat generated by mixing a
fuel gas with air and burning it; and an air supply system for supplying
air to the burner; wherein, when purging an interior of the reformer
using the feed gas in shutting down the hydrogen generator, an amount of
the air supplied is increased to put out a flame of the burner, and a
purge gas sent out from the outlet port by the purging is mixed and
diluted with the air in the burner and is discharged outside.