Safrole is an organic compound with the formula CH2O2C6H3CH2CH=CH2. It is a colorless oily liquid, although impure samples can appear yellow. A member of the phenylpropanoid family of natural products, it is found in sassafras plants, among others. Small amounts are found in a wide variety of plants, where it functions as a natural antifeedant. Ocotea pretiosa, which grows in Brazil, and Sassafras albidum, which grows in eastern North America, are the main natural sources of safrole. It has a characteristic "sweet-shop" aroma.
It is a precursor in the synthesis of the insecticide synergist piperonyl butoxide, the fragrance piperonal via isosafrole, and the empathogenic/entactogenic substance MDMA.
Safrole was obtained from a number of plants, but especially from the sassafras tree (Sassafras albidum), which is native to North America, and from Japanese star anise (Illicium anisatum, called shikimi in Japan). In 1844, the French chemist Édouard Saint-Èvre determined safrole's empirical formula. In 1869, the French chemists Édouard Grimaux (1835–1900) and J. Ruotte investigated and named safrole. They observed its reaction with bromine, suggesting the presence of an allyl group. By 1884, the German chemist Theodor Poleck (1821–1906) suggested that safrole was a derivative of benzene, to which two oxygen atoms were joined as epoxides (cyclic ethers).
In 1885, the Dutch chemist Johann Frederik Eijkman (1851–1915) investigated shikimol, the essential oil that is obtained from Japanese star anise, and he found that, upon oxidation, shikimol formed piperonylic acid, whose basic structure had been determined in 1871 by the German chemist Wilhelm Rudolph Fittig (1835–1910) and his student, the American chemist Ira Remsen (1846–1927). Thus Eijkman inferred the correct basic structure for shikimol. He also noted that shikimol and safrole had the same empirical formula and had other similar properties, and thus he suggested that they were probably identical. In 1886, Poleck showed that upon oxidation, safrole also formed piperonylic acid, and thus shikimol and safrole were indeed identical.