How to Make Basil Pesto (with Dairy Free Option)
When you have plenty of basil – make pesto. Heck, this stuff is so good you should hunt down bunches of fresh basil so you can make and freeze classic basil pesto. Or, in spring, when basil is just starting to grow, make nettle pesto with stinging nettle.
TL;DR: Classic basil pesto blends fresh basil, garlic, pine nuts, Parmesan, and olive oil into a rich green sauce, ready in about 10 minutes. No Parmesan? Swap in nutritional yeast for a dairy-free, vegan version. Use it on pasta, pizza, sandwiches, eggs, or roasted veggies. Store in fridge for 4-5 days or freeze in ice cube trays for convenient sized pesto all winter.
Read More: How to Preserve Basil, Tomato & Basil Bruschetta, Pesto Pasta
How to Use Basil Pesto
Once you’ve got a batch made, here’s where it goes:
- Pasta — toss with hot pasta and a splash of the pasta cooking water to loosen it into a sauce.
- Pizza/Focaccia/Galettes— use as the base instead of tomato sauce on homemade pizza. Or, try it on focaccia or in a galette like this Tomato Pesto Galette.
- Eggs — a spoonful stirred into scrambled eggs or spread under a fried egg on toast.
- Bread — spread on bread before toasting, or swirl into bread dough.
- Dip — mix with a little sour cream, cream cheese or yogurt for a quick veggie dip.
- Sandwiches & Wraps — use in place of mayo or mustard.
- Salad dressing — thin with a bit more oil and a splash of vinegar or lemon juice for green leaf salads. Or use with a little mayo for creamy pasta or potato salads.
- Vegetable topping — stir into roasted or steamed vegetables, or spiralized zucchini noodles for a 5-minute meal.
Ingredient Substitutions for Basil Pesto
Basil pesto is actually very forgiving and can be adapted as needed based on what you have on hand or if you have to accommodate food intolerances or preferences. Here are some that I’ve tried.
No pine nuts? Use walnuts, almonds, or sunflower seeds. Pine nuts are the classic choice but also the most expensive. Walnuts and almonds give a heartier flavour, and sunflower seeds or pepitas are a good nut-free option. I have used them all, I even used hazelnuts one time which I might not recommend as much because it was quite unique.
Garlic to taste. Three cloves gives a good punch, especially if it’s really fresh. Go with your personal preference here, just remember it’s going in raw so it’s not going to mellow much once it’s blended.
Oil. Extra virgin olive oil is classic, but a mild avocado oil or canola oil works too if that’s what you have.
Basil. If you don’t have quite enough basil, you can make up the difference with other greens like parsley, baby spinach, arugula or even carrot tops. In fact, you could make pesto with just these greens alone, but the flavour profile will vary quite a bit with each one. I have even made Stinging Nettle Pesto a few times (don’t worry blanching the nettles keeps it perfectly sting free).
No Parmesan? Use nutritional yeast. This actually happened to me. I was about to start a batch of basil when I realized I was out of Parmesan. I live in the country so quickly running to the store was not an option. I needed a substitute for the salty, umami flavour that Parmesan brings to pesto. Enter, nutritional yeast or “nooch”. Nutritional yeast is deactivated yeast sold as small yellow flakes with a nutty, savoury flavour. Available in the health food aisle or bulk bins section of your grocery store (sometimes shelved near the vitamins). It’s a great dairy-free swap for Parmesan, and an easy, tasty way to make this pesto vegan. I used 1/3 cup of nutritional yeast and added a bit more salt. Taste test and adjust the seasoning to your liking.
How to Prevent Basil Pesto from Turning Brown
Basil that is cut and exposed to air will oxidize (turn dark). It’s perfectly safe to eat, it just won’t be a vibrant, bright green.
If you really want to preserve the bright green colour, here are three options.
- Coat with oil. Coat finished pesto completely with oil immediately so that it is completely surrounded in a layer of oil. This prevents air from touching the chopped basil. When freezing in ice cube trays, add a layer of oil to the top of each cube. Do several small batches so you can work quickly and coat each batch in oil in between processing.
- Blanch Basil. Blanching will lock in that green colour by stopping the enzyme action that causes discolouration. Be sure to prep everything ahead of time, so you’re ready to move through all the steps quickly. Once blanched and cooled, you no longer need to rush through any steps – you’ve locked in the colour.
- Bring a big pot of water to a boil.
- Add washed and trimmed basil to boiling water.
- Submerge only for 10 second and watch green colour intensify. Scoop out and immediately transfer to ice water bath.
- Shock in ice water bath until cooled completely.
- Remove to strainer and drain as much water as possible.
- Pat dry to remove excess water before using in pesto.
- Add lemon juice. Add 2 tsp for every 1 cup of basil to lower the pH enough to slow down the browning reaction.

How to Store and Freeze Basil Pesto
Storing pesto in the refrigerator:
Store pesto in an airtight container in the fridge for 4-5 days. Because of the fresh greens and garlic bathed in oil, homemade pesto is at risk for botulism, even in the fridge. It will not store as long as commercial pesto which is processed differently and made with preservatives. You cannot detect the botulism spores in food. If you need to store if for more than 4 days, keep it in the freezer.
Storing Pesto in the Freezer
Spoon pesto into an ice cube tray and freeze until solid, then pop the cubes out and transfer to a freezer bag or airtight container. This way you can easily thaw just what you need. Frozen pesto has the best flavour if used within 6 months, but will be safe for as long as it stays frozen. Thaw a cube or two in the fridge, or stir directly into hot pasta or a warm pan.

Recipe for Basil Pesto
Classic Basil Pesto
Ingredients
- 2 cups packed fresh basil leaves
- 2/3 cup pine nuts or walnuts, almonds, sunflower seeds
- 3 cloves fresh garlic or more
- 1/2 cup Parmesan cheese grated
- 1/2 tsp salt
- 1 Tbsp lemon juice
- 1/2 cup extra virgin olive oil
Instructions
- Wash and gently dry basil leaves. Set aside to let air dry.
- In food processor, chop pine nuts, garlic, Parmesan cheese, and salt until crumbly.
- Add basil leaves, lemon juice and a little bit of the olive oil. Process briefly and scrape down bowl of processor.
- With processor running pour remaining oil into basil mix to create a paste.
- Taste and adjust seasoning as desired, more salt, garlic or cheese?
- Fill ice cube tray or containers and freeze. Covering with oil to prevent darkening is optional.
- Once frozen, transfer cubes into a freezer bag and seal well.
- It will be safe to eat as long as it remains frozen. For best flavour, use within 6 months.
- Keep fresh pesto in the fridge for 4-5 days only. Unlike store bought pesto, fresh, homemade pesto does not have any preservatives and it is not acidic enough to prevent harmful pathogens from potentially forming.
Notes
Nutrition Facts (per serving)
There’s nothing difficult about this recipe, but it does take some time to pick, wash and dry the basil. Lucky for me, I often have friends to come and help me make pesto. My friend Randi, my sister and my friend Alix from FrenchKissCook have all been excellent helpers!
Process ingredients in food processor.
Taste and adjust seasoning, then drizzle in oil and process until desired smoothness.
More Ways to Enjoy Basil
Panzanella Salad – Tomato, Bread & Basil Salad
How to Dry Basil in the Microwave
How to Dry Basil in a Dehydrator
Not sure where to cut your basil? Watch my new video: How to Prune Basil for Bigger Harvests — I’ll show you the best way to prune basil for healthier plants and bigger harvests.
Cook with the seasons, effortlessly! I’m Getty, a food educator and Professional Home Economist, helping you select, store, and serve seasonal ingredients in delicious, simple, everyday meals. Sign up for seasonal tips and recipes delivered straight to your inbox, and dive deeper with my books, guides, or YouTube content.

