NOVELTY - A hydrogen generator comprises a reformer for reforming starting substances having hydrocarbon-containing compound(s) and water; catalytic agents for producing a water gas shift reaction in a reformate gas stream produced by the reformer; a hydrogen separator for separating hydrogen from the reformate gas stream using membranes; and a heat exchanger for exchanging thermal energy between the reformate gas stream and a further stream of medium.    USE - The inventive generator is used for generating virtually pure hydrogen for fuel cells in a motor vehicle, water-borne vehicle or airborne vehicle. It can be used in motor vehicles, aircrafts or boats, in particular yachts.    ADVANTAGE - The inventive generator advantageously allows the space for an independent water gas shift stage that is required in conventional structures to be saved. It has two crucial advantages over the use of a pure membrane reactor. It takes up a minimal amount of space and entails the lowest possible costs. It makes it possible to provide a large quantity of virtually pure hydrogen per unit volume of the starting substances used.    DETAILED DESCRIPTION - A hydrogen generator (3) for generating virtually pure hydrogen for fuel cells, comprises a reformer (4) for reforming starting substances having hydrocarbon-containing compound(s) and water, where the reformer produces a reformate gas stream; catalytic agents for producing a water gas shift reaction in the reformate gas stream; a hydrogen separator (6) for separating hydrogen out of the reformate gas stream using membranes (7) selectively permeable to hydrogen, and including a proportion of the catalytic agents for producing the water gas shift reaction; and a heat exchanger (5) for exchanging thermal energy between the reformate gas stream and a further stream of medium. The heat exchanger is arranged downstream of the reforming device. It includes a further proportion of the catalytic agents for producing the water gas shift reaction. INDEPENDENT CLAIMS are also included for:    (1) a method of operating a fuel cell, comprising generating hydrogen using the above hydrogen generator from petrol or diesel; and supplying the hydrogen to the fuel cells in a motor vehicle, water-borne vehicle or airborne vehicle; and    (2) an auxiliary power unit for a motor vehicle, water-borne vehicle or airborne vehicle, comprising the above hydrogen generator; and the fuel cell receiving hydrogen from the hydrogen generator.    DESCRIPTION OF DRAWING(S) - The figure shows a diagrammatically depicted fuel cell system.    Hydrogen generator (3)    Reformer (4)    Heat exchanger (5)    Hydrogen separator (6)    Membranes (7)    Exit third (15)