CO and H 2 evolution from renewable and abundant biomass represent a sustainable way, but is challenged to be produced under mild conditions. Herein, we propose to produce CO and H 2 from biomass via a divided photoelectrochemical (PEC) cell at room temperature. Nitrogen doped tungsten trioxide (N-WO 3 ) photoanode reforms biopolyols to CO and H + , and platinum cathode reduces H + to H 2 , achieving CO evolution rate of 45 mmol m À 2 h À 1 (> 75 % gas selectivity) and H 2 evolution rate of 237 mmol m À 2 h À 1 with purity > 99.99 % from glycerol. The nitrogen doping induces structure polarity of WO 3 photoanode, leading to the formation of an internal electric field which promotes the separation and transfer of the photoinduced charges and improves PEC efficiency. A wide range of biopolyols, such as ethylene glycol, xylose, fructose, glucose, sucrose, lactose, maltose, and inulin were effectively converted into CO and H 2 . This work provides a promising method to produce highly pure H 2 together with CO from biomass.