Vanillin, methyl vanillin, or 4-hydroxy-3-methoxybenzaldehyde, is an organic compound with the molecular formula C8H8O3. Its functional groups include aldehyde, ether, and phenol. It is the primary component of the extract of the vanilla bean. It is also found in roasted coffee. Synthetic vanillin, instead of natural vanilla extract, is sometimes used as a flavoring agent in foods, beverages, and pharmaceuticals.
Methyl vanillin is used by the food industry as well as ethylvanillin. The ethyl is more expensive but has a stronger note. It differs from vanillin by having an ethoxy group (-O-CH2CH3) instead of a methoxy group (-O-CH3).