# Transesterification

Transesterification is the process of exchanging the organic functional group R″ of an ester with the organic group R' of an alcohol. These reactions are often catalyzed by the addition of an acid or base catalyst. Strong acids catalyze the reaction by donating a proton to the carbonyl group, thus making it a more potent electrophile. Bases catalyze the reaction by removing a proton from the alcohol, thus making it more nucleophilic. The reaction can also be accomplished with the help of enzymes, particularly lipases (one example is the lipase E.C.3.1.1.3).
If the alcohol produced by the reaction can be separated from the reactants by distillation this will drive the equilibrium toward the products. This means that esters with larger alkoxy groups can be made from methyl or ethyl esters in high purity by heating the mixture of ester, acid/base, and large alcohol.

## Mechanism

In the transesterification mechanism, the carbonyl carbon of the starting ester reacts to give a tetrahedral intermediate, which either reverts back to the starting material, or proceeds to the transesterified product (RCOOR$^2$). The various species exist in equilibrium, and the product distribution depends on the relative energies of the reactant and product. Depending on reaction conditions ester hydrolysis and/or esterification will also occur, which results in some amount of free carboxylic acid being present.

## Applications
### Polyester production

The largest scale application of transesterification is in the synthesis of polyesters. In this application, diesters undergo transesterification with diols to form macromolecules. For example, dimethyl terephthalate and ethylene glycol react to form polyethylene terephthalate and methanol, which is evaporated to drive the reaction forward.

### Methanolysis and biodiesel production

The reverse reaction, methanolysis, is also an example of transesterification. This process has been used to recycle polyesters into individual monomers (see plastic recycling). It is also used to convert fats (triglycerides) into biodiesel. This conversion was one of the first uses. Transesterified vegetable oil (biodiesel) was used to power heavy-duty vehicles in South Africa before World War II.
It was patented in the US in the 1950s by Colgate, though biolipid transesterification may have been discovered much earlier. In the 1940s, researchers were looking for a method to more readily produce glycerol, which was used to produce explosives for World War II. Many of the methods used today by producers have their origin in the original 1940s research.
Biolipid transesterification has also been recently shown by Japanese researchers to be possible using a supercritical methanol methodology, whereby high temperature, high-pressure vessels are used to physically catalyze the biolipid/methanol reaction into fatty-acid methyl esters.

### Fat processing

Fat interesterification is used in the food industry to rearrange the fatty acids of triglycerides in edible fats and vegetable oils. For example, a solid fat with mostly saturated fatty acids may be transesterified with a vegetable oil having high unsaturated acid contents, to produce a spreadable semisolid fat whose molecules have a mix both kinds of acids.

### Synthesis

Transesterification is used to synthesize enol derivatives, which are difficult to prepare by other means. Vinyl acetate, which is cheaply available, undergoes transesterification, giving access to vinyl ethers:
    ROH + AcOCH=CH $_2$ ⟶ ROCH=CH $_2$ + AcOH
The reaction can be effected with high enantioselectivity when mediated with a lipase.