Crude oil mainly consists of hydrocarbon molecules, but impurities, such as sulfur, nitrogen, oxygen, iron, arsenic, vanadium, copper, nickel, sodium chloride, calcium chloride and magnesium chloride, are also present. The hydrocarbon molecules include straight chains, branched chains and rings.
Crude oil needs to be refined to remove the impurities, yielding energy-rich fuels like diesel and gasoline as well as useful substances like paraffin wax. The smallest hydrocarbon is methane, which is a gas. Chains with five or more carbons are liquids at room temperature. Very long chains are solids. The main classes of hydrocarbons include aromatics, paraffin, naphthenes and alkenes.