Is Caffeine an Acid or a Base?

Caffeine is a base. It occurs naturally in the leaves, fruits or seeds of over 60 plants worldwide, including coffee beans, cacao beans, kola nuts and many tea plants. In its purified form, it is a bitter white powder with the chemical formula C8H10N4O2.

While caffeine is basic, coffee and tea are both mildly acidic due to other chemicals present, such as formic and acetic acids. The acidity of coffee and tea can vary, but neither has a pH much below 5.0, meaning they are considerably less acidic than most fruit juices or sodas. Caffeine was first identified as the stimulating agent in coffee during the early 1800s. It works by blocking the action of adenosine, a brain chemical associated with sleep.