A process for producing hydrogen from a hydrocarbon feed and steam, comprising: - a step for producing a synthesis gas in a unit for steam reforming the hydrocarbon feed in the presence of steam, with a fuel providing the heat necessary for the reaction, - a step for steam converting synthesis gas obtained in the preceding step, producing a stream of hydrogen containing methane and carbon dioxide, - a step for capturing carbon dioxide present in the stream obtained from the steam conversion step in order to separate the carbon dioxide from the stream of hydrogen, - a step for capturing and recycling impurities present in the stream of hydrogen to the steam reforming step, said step for capturing and recycling the impurities is carried out in an adsorption unit comprising at least two adsorbers and comprises at least one of the following successive phases: adsorbing the impurities on the first adsorber, regenerating the first adsorber and adsorbing the impurities on the second adsorber, said adsorber regeneration phase is carried out as follows: • isolating the adsorber when it is saturated and bringing the second adsorber on-line, • flushing the first adsorber with a stream of a hydrocarbon feed intended to act as the feed for the steam reforming unit and heated by exchange with steam also intended for the steam reforming unit, to a temperature which is at least 20°C higher than the steam condensation temperature, • regenerating the heated adsorber and desorbing the impurities by circulating steam superheated by at least 20°C intended for the steam reforming unit, • eliminating steam present in the regenerated adsorber by flushing the adsorber with a stream of pure hot hydrogen, • flushing the adsorber freed of steam with a stream of pure cold hydrogen. - a step for producing a synthesis gas in a unit for steam reforming the hydrocarbon feed in the presence of steam, with a fuel providing the heat necessary for the reaction, - a step for steam converting synthesis gas obtained in the preceding step, producing a stream of hydrogen containing methane and carbon dioxide, - a step for capturing carbon dioxide present in the stream obtained from the steam conversion step in order to separate the carbon dioxide from the stream of hydrogen, - a step for capturing and recycling impurities present in the stream of hydrogen to the steam reforming step, said step for capturing and recycling the impurities is carried out in an adsorption unit comprising at least two adsorbers and comprises at least one of the following successive phases: adsorbing the impurities on the first adsorber, regenerating the first adsorber and adsorbing the impurities on the second adsorber, said adsorber regeneration phase is carried out as follows: • isolating the adsorber when it is saturated and bringing the second adsorber on-line, • flushing the first adsorber with a stream of a hydrocarbon feed intended to act as the feed for the steam reforming unit and heated by exchange with steam also intended for the steam reforming unit, to a temperature which is at least 20°C higher than the steam condensation temperature, • regenerating the heated adsorber and desorbing the impurities by circulating steam superheated by at least 20°C intended for the steam reforming unit, • eliminating steam present in the regenerated adsorber by flushing the adsorber with a stream of pure hot hydrogen, • flushing the adsorber freed of steam with a stream of pure cold hydrogen. adsorbing the impurities on the first adsorber, regenerating the first adsorber and adsorbing the impurities on the second adsorber, said adsorber regeneration phase is carried out as follows: • isolating the adsorber when it is saturated and bringing the second adsorber on-line, • flushing the first adsorber with a stream of a hydrocarbon feed intended to act as the feed for the steam reforming unit and heated by exchange with steam also intended for the steam reforming unit, to a temperature which is at least 20°C higher than the steam condensation temperature, • regenerating the heated adsorber and desorbing the impurities by circulating steam superheated by at least 20°C intended for the steam reforming unit, • eliminating steam present in the regenerated adsorber by flushing the adsorber with a stream of pure hot hydrogen, • flushing the adsorber freed of steam with a stream of pure cold hydrogen. • isolating the adsorber when it is saturated and bringing the second adsorber on-line, • flushing the first adsorber with a stream of a hydrocarbon feed intended to act as the feed for the steam reforming unit and heated by exchange with steam also intended for the steam reforming unit, to a temperature which is at least 20°C higher than the steam condensation temperature, • regenerating the heated adsorber and desorbing the impurities by circulating steam superheated by at least 20°C intended for the steam reforming unit, • eliminating steam present in the regenerated adsorber by flushing the adsorber with a stream of pure hot hydrogen, • flushing the adsorber freed of steam with a stream of pure cold hydrogen.