I have just put together on my mind these two facts: caffeine is an alkaloid and brewed coffee is slightly acidic (pH = 5).

My Biology teacher and my Chemistry teacher could not elaborate satisfying answers, but my Physics teacher said it could be because of substances to the industrial coffee powder (hillbillies in Brazil, for instance, do not display gastritis attained from too much coffee).

  • 4
    $\begingroup$ Saying something's an "alkaloid" isn't that informative as to it's pH. Sure, if it's a free base, it likely is, but more often than not people use HCl salts of the drugs for their improved solubility, and those salts are acidic; morphine HCl as an example. The final step of methamphetamine production is often acidifying the organic, free-base form to have it precipitate out of the organic phase. $\endgroup$
    – Nick T
    Oct 17, 2014 at 2:39
  • 1
    $\begingroup$ I would also add that gastritis is not caused by the acidity of coffee, or in most cases by the acidity in any particular food. Gastritis is generally caused by bacterial infection or by overuse of NSAIDs. If you're referring to the more commonly linked to coffee "heartburn" or GIRD, that is caused by the caffeine, not because of acidity or alkalinity but because it relaxes the muscle that controls the connection to the esophagus. $\endgroup$
    – Joe
    Oct 17, 2014 at 6:14
  • 1
    $\begingroup$ The lethal dose of caffeine is around 10-15 grams. If the main constituent of ground coffee was caffeine then anyone who had more than a couple of cups of coffee would be dead $\endgroup$ Oct 17, 2014 at 13:15
  • 3
    $\begingroup$ Are you confusing Alkaloid and alkali? An alkaloid is a type of organic compound, but is not necessarily a base (or alkali). $\endgroup$
    – user24082
    Dec 23, 2015 at 20:24
  • $\begingroup$ Alkaloid means "alkali-like". Steroid means "solid-like". But factoid does NOT mean "fact-like". $\endgroup$
    – user55119
    Oct 8, 2018 at 20:10

3 Answers 3


Coffee contains hundreds, if not thousands, of other compounds in addition to caffeine. Included among these other compounds are many acids. Many small, organic acids such as citric, malic, lactic, pyruvic and acetic acid are present, but both quinic acid and chlorogenic acid (and their derivatives) are usually present in even higher concentration. Phosphoric acid, an inorganic acid, is also present. The exact concentration of these various acids depends upon processing variables such as roast conditions and grind size. Here is a link to an interesting, one-page discussion of the subject.

quinic acid

enter image description here

chlorogenic acid

chlorogenic acid

Edit: In Season 3, episode 6 of "Breaking Bad", we meet Walt's new lab assistant Gale, who is brewing coffee using a lab glassware set-up. Walt says that it is the best coffee he has ever tasted and Gale responds by mentioning "quinic acid" as something to be considered in brewing great coffee.

  • $\begingroup$ Nice. But can you find a mistake in your claimed formula of chlorogenic acid? $\endgroup$
    – mykhal
    Jul 2, 2020 at 15:45
  • $\begingroup$ @mykhal Thanks for pointing that out. $\endgroup$
    – ron
    Jul 3, 2020 at 20:54

Alkaloids are low molecular weight nitrogen-containing compounds, mostly from plants. The nitrogen is usually in the form of amines and this often results in a basic compound, but there are many alkaloids where this is not the case. In fact, caffeine is a pretty weak base. I calculated the pKa of the imine nitrogen with MarvinSketch as -.92, so caffeine is not going to affect the pH of coffee much.

Also, caffeine isn't even a major component of brewed coffee, only accounting for ~1% of the dry mass. If you look here you'll see that brewed and green coffee naturally contains a fair bit of soluble acids, including things like nicotinic acid (vitamin B3), which probably accounts for the pH of brewed coffee, rather than the caffeine or any processing.

  • $\begingroup$ PubChem has the pKa as 10.4 : pubchem.ncbi.nlm.nih.gov/summary/summary.cgi?cid=2519 $\endgroup$
    – jerepierre
    Oct 16, 2014 at 21:40
  • $\begingroup$ Weird, the source they cite says "Caffeine is both a weak acid and a weak base with pKa values of 14.0 and 0.7. Although partial ionization to cation and anion forms may occur, electrochemical studies have found that the neutral form of caffeine was predominant in the pH range of 5.5 to 9." toxnet.nlm.nih.gov/cgi-bin/sis/search2/… Anyways, even if it were a strong base, its concentration is still very low (~2 mM assuming 100 mg/250 mL) $\endgroup$ Oct 16, 2014 at 22:23

As far as pinning down a specific, standalone pH, caffeine is, if trivially, an acidic contributor to coffee:

pH = 6.9 (1% solution) O'Neil, M.J. (ed.). The Merck Index - An Encyclopedia of Chemicals, Drugs, and Biologicals. Cambridge, UK: Royal Society of Chemistry, 2013., p. 289 from HSDB

HSDB Record Name: CAFFEINE URL: https://toxnet.nlm.nih.gov/cgi-bin/sis/search/r?dbs+hsdb:@term+@rn+@rel+58-08-2


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.