This easy basil walnut pesto swaps pine nuts for toasted walnuts and comes together in 10 minutes! Toss it with pasta or it freeze it for later.

Every year I grow basil in my garden and while having so much basil is exciting, it’s also a little overwhelming trying to use it all up. Enter: this simple walnut pesto! Not only does pesto require a generous amount of basil, but it’s also easy to freeze for later use.
In the spirit of staying on a budget, I’ve replaced the traditional pine nuts in homemade pesto sauce with walnuts. Walnuts aren’t quite as flavorful as pine nuts, but they’re a fraction of the price and give pesto a fantastic texture. Here are all my tips on how to make it!
5 Star Reader Review
⭐⭐⭐⭐⭐ “Absolutely delicious!! I could not stop eating it. Balance of flavors was excellent. Thanks for a great recipe.” -Shannon

Walnut Pesto Ingredients
Here are the ingredients you’ll need for this walnut pesto recipe:
- Walnuts: Buy raw, unsalted walnuts for this recipe (halves or pieces both work). Technically, you can use any nut you’d like in this homemade pesto recipe (pecans, macadamia nuts, almonds, etc), but I like walnuts for their neutral flavor and good price.
- Fresh basil: You’ll need 3 loosely packed cups of leaves, which can be a lot if you’re buying basil from the store (but it’s worth it!). Adding the tender stems is fine, but make sure to remove any thick ones.
- Parmesan cheese: I recommend grating your own Parmesan cheese at home: the fresh blocks from the cheese counter are much higher quality than the pre-packaged stuff on the shelves. Alternatively, use the pre-shredded Parmesan rather than the powdered stuff in a shaker can. If you want to omit the cheese altogether try my Vegan Cashew Pesto recipe.
- Garlic: This is key to the savory flavor.
- Lemon juice and olive oil: Fresh lemon brightens everything up, and the oil makes the saucy consistency.

How to Make Walnut Pesto
All you need is a skillet and a food processor! Here’s the basic method (or jump to the recipe below):
- Toast the walnuts (optional): Place the walnuts in a dry skillet and stir for about 2 minutes over medium-high heat, then let them cool. This infuses the nuts with even more flavor.
- Chop the base: Add the walnuts, cheese, and garlic to a food processor and process for about 30 seconds.
- Add the remaining ingredients and blend: Add the basil, lemon juice, and salt. Turn on the food processor and gradually add the olive oil.
- Adjust. Once it’s combined, stop and taste. Add a bit more olive oil for a looser sauce.
How To Freeze Pesto
Pesto freezes beautifully. I recommend freezing this walnut pesto in an ice cube tray, and then transferring the cubes to a sealed baggie once completely frozen.
Pesto stays fresh for about six months this way, and it lets you thaw exactly how much you need for a recipe (1 frozen pesto cube is perfect for 1 serving of pasta, for example). You can also freeze pesto in small jars or any other containers you have on hand, but it’ll be trickier to thaw out the exact amount you need for a future recipe.
When you’re ready to use the pesto cubes, simply take a few out of the bag and pop them into whatever dish you’re making. Because pesto is oil-based, it thaws quickly, meaning you don’t need to take it out of the freezer ahead of time!

Ways to Use It: Pasta and Beyond
There are so many ways to use pesto (I could eat it every day!). Here are a few of my top ideas:
- Pasta: Save about 1 cup of pasta water, then toss cooked pasta with pesto and bits of pasta water until it comes together into a loose sauce. Try it in my pesto pasta or pesto gnocchi.
- Pizza: Spread it on dough for a pesto pizza.
- Sandwiches: Slather it on pesto sandwich.
- Soups: Swirl it into a bowl of minestrone soup.
- Seafood: Spoon it over pesto salmon or pesto shrimp.
- Dressings and dips: Whisk it into pesto salad dressing or a quick pesto aioli.
Want more ideas? Browse all of my recipes with pesto.
Dietary Notes
This walnut pesto recipe is vegetarian and gluten-free.
Walnut Pesto with Basil
This easy basil walnut pesto swaps pine nuts for toasted walnuts and comes together in 10 minutes! Toss it with pasta or it freeze it for later.
- Prep Time: 10 minutes
- Cook Time: 0 minutes
- Total Time: 10 minutes
- Yield: ¾ cup 1x
- Category: Sauce
- Method: Raw
- Cuisine: Italian
- Diet: Gluten-Free, Vegetarian
Ingredients
- ¼ cup walnuts
- ½ cup Parmesan cheese, large grated
- 2 medium garlic cloves
- 3 cups loosely packed fresh basil
- 1 tablespoon fresh lemon juice
- ¼ teaspoon kosher salt
- ¼ cup olive oil
Instructions
In a small dry skillet, toast the walnuts over medium high heat, stirring constantly, for about 2 minutes. Remove the nuts to a bowl and allow them to cool slightly.
In food processor, combine walnuts, cheese, and garlic. Process until finely ground, 20 to 30 seconds.
Add the basil, lemon juice and kosher salt. Turn on the food processor and gradually pour in the olive oil. Once combined, turn off the food processor. Add a bit more olive oil if desired.



Absolutely delicious!! I could not stop eating it. Balance of flavors was excellent. Thanks for a great recipe.
Thank you for this recipe! For the first time EVER I have managed to grow basil! Always a failure indoors, but this year I tried the patio, and it worked! Pine nuts are very difficult to find in my area, so I’m thrilled to be able to use walnuts! I’m so excited to go out and harvest basil RIGHT NOW!
You’re welcome! Hope you enjoy :)
Hi! I use either pistachios or cashews, both of which are also much cheaper than pine nuts. Tastes great either way. Also, in terms of the darkening, I’ve had that happen before, too. If you blanch the basil, that helps keep the green bright. I’ve finally settled upon the easiest way, which is to boil some water, put the basil in a little strainer, and just dip it into the boiling water for 10 seconds or so. That way, you don’t have to fish the leaves out and they don’t get overcooked and wilt down to nothing. I didn’t even bother to put it in cold water afterwards, and it looks great.
Sounds easy to make. I love pesto and use it on pizza, in pastas and sandwiches.
I’ve always made my pesto with sunflower seeds. Money-saving alternative to pine nuts, and also works for those with nut allergies!
Just made the second batch of this in 24 hours! It’s so good and the best way to use up the abundance of basil before it goes bad. I do have a question though. These two batches have been darker than pesto I’ve made before. Dark enough that I had to tell people what it was last night. Anybody know whether that could be from the pecans? It’s the only thing I can think of since my pesto is usually a bright green rather than dark.
Hmm, not sure about this one. The only thing I’ve noticed is that pesto tends to darken as you expose it to air…did you have it out for longer than normal?
I love seeing walnuts in your recipe! I’m not a fan of pine nuts so I always use toasted walnuts instead. People rave about my pesto but I always thought it was so much better because of the garden basil. But maybe it’s the walnuts! Be sure to toast them for even more flavor.
Just discovered your site a couple days ago when @JBGorganic tweeted your potato argula flat bread recipe. Your site layout is a breath of fresh air, so clean and inviting. And I can’t wait to try the flat bread recipe this weekend using potatoes & argula from Johnson’s.
Oh – for Roshni, the person who asked about freezing pesto – most recipes call for stirring in the parmesan cheese AFTER adding the oil. If you do it that way, you can freeze the pesto without cheese & just stir it in after you thaw the pesto.
BTW, I just made this & discovered I had no walnuts after the basil & garlic were in the food processor. So I used pecans. It tastes pretty good now & I bet it’s even better in half an hour or so. Serving it tonight at Game Night. Am about to make the Black Bean Quinoa Bowl with Peach Salsa, too. Will let you know how they both go over.
This is great –t hanks so much for your nice comments! I’m excited that you are making the pesto, flatbread and quinoa bowl – let us know how they turn out!
Great idea on the pecans in the pesto – we love using alternative nuts to pinenuts, especially since pinenuts are so expensive! We found it tastes just as good (or better!).
Regarding freezing pesto – we’ve tried freezing it all together and freezing it without the nuts and cheese. We found that it tasted just fine freezing it with the cheese (even after many months), so we decided to just do that this year!
We freeze our pesto with the nuts and cheese and it is great! We have frozen some for over a year and it still tastes great!
We freeze ours in our muffin pan. Spray it with cooking spray…fill with pesto…cover the entire top with Saran wrap and place in the freezer until completely frozen. Then, simply use a butter knife to pop out the frozen pucks and store in a quart size bag.
Whenever we want pesto, we just set a puck in a bowl and leave it on the counter for about 30 minutes.
I am so excited about the tip to roast the walnuts…I am so excited to try it out!
this recipe is yummy, but any tips on freezing pesto for the winter??
I couldn’t keep up with the amount of basil growing in my last garden! It got out of control! In all seriousness, basil is one of those herbs that can do so much for a dish – alone or in a pesto. Doesn’t matter! The photo looks great!