Biogas is a gaseous renewable energy source produced from raw materials such as agricultural waste, manure, municipal waste, plant material, sewage, green waste, wastewater, and food waste. Biogas is produced by anaerobic digestion with anaerobic organisms or methanogens inside an anaerobic digester, biodigester or a bioreactor. The gas composition is primarily methane (CH
4) and carbon dioxide (CO
2) and may have small amounts of hydrogen sulfide (H
2S), moisture and siloxanes. The methane can be combusted or oxidized with oxygen. This energy release allows biogas to be used as a fuel; it can be used in fuel cells and for heating purposes, such as in cooking. It can also be used in a gas engine to convert the energy in the gas into electricity and heat.
Biogas can be upgraded to natural gas quality specifications by stripping carbon dioxide and other contaminants. Biogas that has been upgraded to interchangeability with natural gas is called Renewable Natural Gas (RNG). RNG can be used a drop-in fuel in the gas grid or to produce compressed natural gas as a vehicle fuel.