The pleasures of coffee, tea, and chocolate drinking have been known to humans for centuries, but the isolation of caffeine from these beverages was accomplished only in the early 1800s. During the 1820s, researchers identified the active agents in tea and chocolate and gave them a variety of names such as guaranin. In 1840, T. Martins and D. Berthemot independently showed that these compounds are all identical with caffeine. Caffeine itself was originally called cofeine or caffein and only in the late 1820s was given the name by which we know it today.
Much of the work leading to the full characterization of caffeine's molecular structure was completed by the German chemist Emil Fischer (1852-1919). Fischer first synthesized the compound from raw materials in 1895, and two years later derived its precise structural formula.