Process for preparing hydrogen by reforming hydrocarbons with steam, and for separation of carbon dioxide, wherein the process comprises the following steps: (a) providing a feed gas stream FG, wherein the feed gas stream FG comprises a hydrocarbon component and steam, wherein the hydrocarbon component comprises at least methane; (b) reforming at least a portion of the feed gas stream FG in an endothermic reforming step over a reforming catalyst to give a synthesis gas stream SG1, wherein the synthesis gas stream SG1 comprises hydrogen, carbon monoxide, carbon dioxide, and unreacted methane; (c) reforming a portion of the feed gas stream FG in an autothermal reforming step to give a synthesis gas stream SG2, and combining the synthesis gas streams SG1 and SG2 to give a synthesis gas stream SG3, or reforming the synthesis gas stream SG1 in an autothermal reforming step to give a synthesis gas stream SG3, wherein the autothermal reforming step comprises exothermic partial oxidation and endothermic reforming with steam over a reforming catalyst, wherein the synthesis gas streams SG2 and SG3 comprise hydrogen, carbon monoxide, carbon dioxide, and unreacted methane, and wherein heat generated by the autothermal reforming step is utilized for heating in the endothermic reforming step of step (b); (d) converting the carbon monoxide present in the synthesis gas stream SG3 with steam to give hydrogen and carbon dioxide to give a synthesis gas stream SG4, wherein the synthesis gas stream SG4 comprises hydrogen, carbon dioxide, unreacted methane, and carbon monoxide unconverted in step (d); (e) separating hydrogen from the synthesis gas stream SG4 by pressure swing adsorption, giving a hydrogen-rich stream HG1 and a residual gas stream RG1, wherein the residual gas stream RG1 comprises carbon dioxide, carbon monoxide unconverted in step (d), hydrogen not separated off in step (e), and unreacted methane; (f) separating carbon dioxide from the residual gas stream RG1 obtained in step (e) by cryogenic carbon dioxide separation, giving a carbon dioxide-rich stream CG1 and a residual gas stream RG2, wherein the residual gas stream RG2 comprises carbon monoxide unconverted in step (d), hydrogen not separated off in step (e), carbon dioxide not separated off in step (f), and unreacted methane. (a) providing a feed gas stream FG, wherein the feed gas stream FG comprises a hydrocarbon component and steam, wherein the hydrocarbon component comprises at least methane; (b) reforming at least a portion of the feed gas stream FG in an endothermic reforming step over a reforming catalyst to give a synthesis gas stream SG1, wherein the synthesis gas stream SG1 comprises hydrogen, carbon monoxide, carbon dioxide, and unreacted methane; (c) reforming a portion of the feed gas stream FG in an autothermal reforming step to give a synthesis gas stream SG2, and combining the synthesis gas streams SG1 and SG2 to give a synthesis gas stream SG3, or reforming the synthesis gas stream SG1 in an autothermal reforming step to give a synthesis gas stream SG3, wherein the autothermal reforming step comprises exothermic partial oxidation and endothermic reforming with steam over a reforming catalyst, wherein the synthesis gas streams SG2 and SG3 comprise hydrogen, carbon monoxide, carbon dioxide, and unreacted methane, and wherein heat generated by the autothermal reforming step is utilized for heating in the endothermic reforming step of step (b); reforming the synthesis gas stream SG1 in an autothermal reforming step to give a synthesis gas stream SG3, wherein the autothermal reforming step comprises exothermic partial oxidation and endothermic reforming with steam over a reforming catalyst, wherein the synthesis gas streams SG2 and SG3 comprise hydrogen, carbon monoxide, carbon dioxide, and unreacted methane, and wherein heat generated by the autothermal reforming step is utilized for heating in the endothermic reforming step of step (b); (d) converting the carbon monoxide present in the synthesis gas stream SG3 with steam to give hydrogen and carbon dioxide to give a synthesis gas stream SG4, wherein the synthesis gas stream SG4 comprises hydrogen, carbon dioxide, unreacted methane, and carbon monoxide unconverted in step (d); (e) separating hydrogen from the synthesis gas stream SG4 by pressure swing adsorption, giving a hydrogen-rich stream HG1 and a residual gas stream RG1, wherein the residual gas stream RG1 comprises carbon dioxide, carbon monoxide unconverted in step (d), hydrogen not separated off in step (e), and unreacted methane; (f) separating carbon dioxide from the residual gas stream RG1 obtained in step (e) by cryogenic carbon dioxide separation, giving a carbon dioxide-rich stream CG1 and a residual gas stream RG2, wherein the residual gas stream RG2 comprises carbon monoxide unconverted in step (d), hydrogen not separated off in step (e), carbon dioxide not separated off in step (f), and unreacted methane.