There is flexibility in how hydrogen is created, depending on what feedstock and power sources are available. Hydrogen can be produced in large amounts from primary energy sources, such as fossil fuels (coal, oil, or natural gas), as a by-product from a variety of chemical processes (chlor-alkali, refinery products) and from alternative resources such as biomass, biogas, and waste materials. Hydrogen can also be produced by water electrolysis, which uses electricity from renewable sources, such as wind or solar, to split hydrogen and oxygen elements. Hydrocarbon fuels such as natural gas, butane, methanol, gasoline and others can be used in conjunction with a fuel processor, which extracts a hydrogen stream from the original fuel.