Is Pesto Acidic?
Short answer
Freshly made, classic basil pesto does not contain acidic ingredients. However, for ambient pesto sauces to be safe for long periods, producers must ensure they contain a certain level of acidity.
Long answer
Let's start with a quick science lesson. Any food with a pH of 4.7 or below is deemed acidic, while those over 4.7 are deemed alkaline. This is so critical to pesto producers because all pesto recipes contain garlic and oil, which, if handled incorrectly, can lead to the production of harmful toxins that can make people extremely sick.
The toxins in question are those produced by Clostridium botulinum spores, which are present on the surface of garlic but are not in themselves harmful. However, when these spores are placed in an anaerobic (i.e. no oxygen) alkaline environment, they can start to create harmful toxins.
If you make a fresh pesto using the official recipe, you'll have an alkaline sauce with a pH of around 4.8 - 5.2. Providing it is refrigerated, that sauce will remain safe for several days.
To counteract any risk, producers of long-life, ambient pesto not only have to heat-treat the sauce (via pasteurisation or sterilisation) but also drop the pH to below 4.7 to make it acidic and, therefore, impossible for harmful toxins to be produced. Common acids vary from lemon or lime juice (high in citric acid) to powdered acids like lactic, malic, and tartaric. Some producers may also use vinegar.
Because different batches of ingredients can vary in acidity and pH can alter over time, pesto manufacturers take a 'belt-and-braces' approach and drop the acidity below 4.7. We took pH meter readings from a random selection of shop-bought pestos; on average, their acidity levels were 4.2. The most acidic pesto we found had a pH of 3.8, but it was so sour that we found it unpalatable. That level of acidity can be terrible for anyone who suffers from acid reflux or heartburn.
Luckily, Mediterranean cuisine makes ample use of its world-class lemons, so adding a generous amount of lemon juice to pesto improves its flavour and keeps it green for longer.