Vanillin is a naturally occurring chemical compound and is also produced synthetically. It is used as a flavor enhancer in foods and beverages, and is also used in perfumes and pharmaceuticals.