Biodiesel can be produced from plant and animal oils via a simple chemical reaction. The major component of oils are triglycerides.

Two merged images. the first one shows how a triglyceride can be separated into a glycerol component, which forms the head of the molecule, and three fatty acid chains, which resemble tails. Each fatty acid chain's 'tail' is linked to the glycerol's 'head' via an ester bond. The second image shows how Methanol can react with triglycerides in a transesterification reaction to break the glycerol and fatty acid components apart. This reaction is catalyzed by a strong base like sodium hydroxide.

Figure 1: Triglycerides consist of glycerol (red) linked to three fatty acid chains (blue). Triglycerides (fats) react with methanol to produce glycerol and biodiesel.

An alcohol can be used to remove the fatty acid molecule and produce biodiesel. This reaction requires a basic or acidic catalyst such as NaOH.

The reaction will only take place if there is a catalyst (e.g. NaOH) and the mixture is heated to 60oC.