On this page
If you can draw nucleophilic acyl substitution, you already know transesterification. It is the same mechanism with an alcohol as the nucleophile, it is a standard reaction in exam organic chemistry, and it is how biodiesel is made.
What is a transesterification reaction?
Transesterification is “the conversion of a carboxylic acid ester into a different carboxylic acid ester”, in the words of the LibreTexts chemistry module on transesterification/Esters/Reactivity_of_Esters/Transesterification).
In general form: RCOOR′ + R″OH ⇌ RCOOR″ + R′OH. The acyl part (R–C=O) stays put. Only the alkoxy group on the single-bonded oxygen changes, from OR′ to OR″.
Both sides hold an ester and an alcohol, so the reaction is reversible and its equilibrium constant is close to one, the same LibreTexts module/Esters/Reactivity_of_Esters/Transesterification) notes. That is why the new alcohol is used in large excess, often as the solvent: by Le Chatelier's principle, this pushes the equilibrium to the right.
How does transesterification work under acid and under base?
Both routes pass through a tetrahedral intermediate, exactly as in nucleophilic acyl substitution and the tetrahedral intermediate. The LibreTexts mechanism/Esters/Reactivity_of_Esters/Transesterification) under acid has five steps:
The acid protonates the carbonyl oxygen, which makes the carbonyl carbon more open to attack.
The new alcohol (R″OH) attacks the carbonyl carbon.
A proton moves onto the old alkoxy oxygen, turning OR′ into a good leaving group.
R′OH leaves and the C=O reforms.
Loss of a proton gives the new ester and gives the acid catalyst back.
Under base, the nucleophile is an alkoxide ion, R″O⁻. It attacks the carbonyl carbon, the tetrahedral intermediate collapses, and R′O⁻ leaves. Match the alkoxide to the alcohol: to make a methyl ester, use sodium methoxide in methanol.
You can see that one-way version in the saponification practical for making soap.
How do you predict the product of a transesterification?
Use the same four steps every time:
Circle the acyl part, R–C=O. It does not change.
Box the OR′ on the ester oxygen. This is what leaves, as R′OH.
Write the incoming alcohol's OR″ in its place.
Decide the direction: the products are favoured when the incoming alcohol is in excess or the outgoing alcohol is removed.
Worked example: ethyl acetate, CH₃COOCH₂CH₃, is refluxed in excess methanol with a few drops of concentrated H₂SO₄.
Acyl part: CH₃C=O, unchanged.
Leaving group: OCH₂CH₃, which comes off as ethanol.
Incoming group: OCH₃ from methanol.
Products: methyl acetate, CH₃COOCH₃, and ethanol. Methanol is the solvent, so the equilibrium sits on the product side.
Run it backwards: methyl acetate in excess ethanol with sodium ethoxide gives ethyl acetate back. One trap to watch: if the alcohol and the ester sit in the same molecule, as in a hydroxy ester, the exchange can happen inside the molecule and close a ring, giving a lactone.
How is biodiesel made by transesterification?
Vegetable oils and animal fats are triglycerides: three fatty acid chains joined by ester links to one glycerol (the shape of those chains is why fats are solid and oils are liquid). Each of the three ester groups can swap its glycerol alkoxy group for methoxy. One triglyceride plus three methanol gives three fatty acid methyl esters, which are the biodiesel, and one glycerol.
A review in Clean Energy by Thangaraj and colleagues (2019) describes this as sequential reversible steps, triglyceride to diglyceride to monoglyceride to glycerol, producing one methyl ester molecule at each step. The same review notes that using more methanol than the stoichiometric dose favours the reaction, which is Le Chatelier again.
At plant scale, the US Alternative Fuels Data Center says about 100 pounds of oil or fat react with 10 pounds of a short-chain alcohol, usually methanol, with sodium or potassium hydroxide as catalyst. That gives about 100 pounds of biodiesel and 10 pounds of glycerin.
Why base, and when acid? The Thangaraj review explains that if the oil has more than 1% free fatty acids, part of a base-catalysed process takes the saponification route and forms soap, which makes biodiesel and glycerine hard to separate. Acid catalysts tolerate free acids but are slow, needing more than a day, so for such oils the review recommends two steps: acid first, alkali next.
The review's example is waste oil: acid treatment first cut its free fatty acids, then KOH made the biodiesel. In India, the Food Safety and Standards Authority (FSSAI) has fixed a limit of 25% total polar compounds, beyond which vegetable oil shall not be used for cooking, and its RUCO (Repurpose Used Cooking Oil) initiative collects used oil for conversion to biodiesel, according to a Press Information Bureau release of 2 October 2019.
What should you practise next?
If you understand the mechanism but stall on multi-step problems, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer. To revisit the ideas underneath, such as equilibrium and carbonyl reactivity, the Fermi Concept Library gives each concept its own lesson and its place in the map.



