Allergens in pesto: ingredients, variations and how to order safely
By the Menulta editorial team · Facts checked 15 October 2026 · Updated 15 October 2026
The short answer
Traditional pesto alla genovese contains pine nuts, which are not one of the EU's eight listed nuts, plus basil, garlic, olive oil, Parmesan and pecorino (milk). Many restaurant and bought-in pestos replace some or all pine nuts with cashews or walnuts, which are declarable nuts, and some add potato flakes or whey. Nut-allergic guests should always ask which nuts are used.
What pesto is
Pesto is an uncooked sauce from Liguria in northern Italy, traditionally made by pounding basil, garlic, pine nuts and salt in a mortar, then adding olive oil and grated hard cheese. It is used on pasta (trofie, trenette, linguine), in minestrone, on sandwiches and pizzas and as a dip.
Pine nuts are expensive, which is why many producers use cheaper cashews or walnuts. That changes the allergen status dramatically for guests with tree nut allergies.
Traditional pesto ingredients and their allergens
| Ingredient | Allergen | Note |
|---|---|---|
| Basil | None | |
| Pine nuts | Not an Annex II nut | Some people are allergic to pine nuts |
| Cashews or walnuts (substitutes) | Nuts | Common in bought-in pesto |
| Garlic | None | |
| Olive oil | None | Some bought-in pestos use sunflower oil |
| Parmigiano reggiano, pecorino | Milk | Some pestos add whey or milk proteins |
| Potato flakes or fibre | None (usually) | Used as fillers in some commercial pestos |
Variations that change the allergens
Pesto rosso (red pesto) adds sun-dried tomatoes and often almonds. Pesto alla trapanese, from Sicily, uses almonds, tomatoes, basil and garlic. Pistachio pesto uses pistachios. Vegan pestos remove cheese but often use cashews or nutritional yeast. Nut-free pestos exist and use seeds such as sunflower, which are not EU allergens.
Pesto pizzas and sandwiches combine pesto with mozzarella (milk), bread (gluten) and other toppings, so check the full dish.
Restaurant and bought-in versions
Many restaurants buy pesto in tubs or jars. Labels vary widely: some contain only pine nuts, some cashews, some both, and many carry 'may contain other nuts' warnings. Ask whether the pesto is made in-house and which nuts are used, and if bought in, ask to check the label.
Pesto allergen by allergen
| Allergy | What to know |
|---|---|
| Tree nuts | Depends entirely on the recipe. Ask which nuts are used. Pine-nut-only pesto contains no Annex II nut but may carry nut traces. |
| Pine nut allergy | Not suitable for traditional pesto. |
| Peanuts | Rarely used, but check bought-in labels for peanut or cross-contact warnings. |
| Milk | Traditional pesto contains cheese; vegan versions do not, but check for whey. |
| Gluten | Pesto itself is usually gluten-free; the pasta or bread served with it is not. |
Ordering it with an allergy
Ask whether the pesto is homemade or bought in, which nuts it contains, and whether cheese is added. If you have a tree nut allergy, do not accept 'it's pine nuts' without checking, because many pestos are mixed. If you react to pine nuts, avoid pesto unless the restaurant confirms a nut-free recipe.
Sources
This guide is general information, not medical or legal advice. Guests with an allergy should follow their doctor's advice. Operators should confirm their own setup with their food safety adviser or local authority.