Vanillin 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 and the Chinese red pine. Synthetic vanillin, instead of natural vanilla extract, is sometimes used as a flavoring agent in foods, beverages, and pharmaceuticals.