TECHNOLOGY FOCUS - INORGANIC CHEMISTRY - Preferred Process: Separation of contaminants (already present and/or formed during the process) from (II) and pyrolysis are carried out simultaneously in a single stage; or alternatively separation and/or pyrolysis are carried out in at least two successive stages forming intermediate products. Separation of H2 is carried out by pressure swing adsorption or a membrane process, forming (in addition to (I)) a residual gas, which is preferably burned to provide energy to carry out the process. Before H2 separation, the intermediate (III) is subjected to a water gas shift reaction in which CO is used to convert water into H2 and is preferably completely converted. (III) is optionally purified before H2 separation or before the water gas shift reaction. Pyrolysis is carried out while supply water, steam and/or an oxidizing agent (specifically air, oxygen (O2) or O2-enriched air. Separation of unwanted components from (II) is carried out by distillation, thermal drying, activated carbon filtration, membrane filtration, chromatography and/or ion exchange; in particular (II) is thermally dried at a temperature causing at least partial conversion of glycerol by pyrolysis. Contaminants separated from (II), in dissolved and/or suspended form, are thermally dried to give and anhydrous solids fraction and a gaseous fraction. EXAMPLE - Apparatus as shown in the figure was used to produce hydrogen (H2) from crude glycerol from biodiesel production, containing ca. 85% glycerol, large amounts of water and salts and procesing residues. The crude glycerol was supplied (1) to a vacuum distillation plant (V), giving two streams (2, 3). The mainly glycerol stream (2) was suppled to an autothermal pyrolysis reactor (P), giving a product containing mainly H2 and carbon monoxide (CO). The product was withdrawn (4) from the reactor and supplied to a shift reactor (S), in which most of the CO was reacted with water in a water gas shift reaction. The shift gas, mainly comprising H2, was withdrawn (5) and subjected to pressure swing absorption (PS) to separate H2 formed in the shift reaction in high yield (more than 90 mol. %). The separated H2 (purity more than 99%) was recovered (6) as product. The residual gas stream (7), containing H2 and CO, was used to heat the pyrolysis reactor. The contaminant stream (3) from the vacuum distillation was supplied to a granulator (G) and dried using a hot branch stream (8) withdrawn from the pyrolysis product stream before the shift reactor. A mainly gas and vapor stream (containing some solid dust) was recovered (10) and purified by scrubbing (W) with water. Part of the contaminated scrubbing water was withdrawn (11) and supplied to the vacuum distillation plant, and the remainder (12) was mixed with fresh water (13) and recycled for scrubbing. A stream of pyrolysis gas and steam was withdrawn (14) from the scrubber and combined with the pyrolysis product (4).