Walnut Pesto with Basil

This homemade basil walnut pesto comes together in less than 10 minutes and can be frozen for up to six months. Perfect for sandwiches, soups, and more!

It’s August, and our garden has produced enough basil to exceed our (high!) expectations. I only had 32 square feet of garden room, and I tried to maximize it with food that either tastes better or is cheaper than what you can find at the store. Basil falls into both of these categories, so I was eager to plant it. But while having so much basil is exciting, it’s been 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 (more on how to do that in a bit).

Related: Best Basil Recipes

When making this pesto, I highly recommend grating your own Parmesan cheese at home. The fresh blocks of cheese from the cheese counter are much higher quality than the pre-packaged stuff on the shelves. However, it’s also more expensive, so I understand if you’d prefer something a little more budget-friendly. If the cheese counter isn’t for you, go for the pre-shredded Parmesan rather than the powdered stuff in a shaker (the powdered stuff doesn’t remotely compare to freshly grated Parm). And if you want to do away with cheese altogether, go right over to our Vegan Cashew Pesto recipe!

In the spirit of staying on a budget, we’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. Make sure to buy raw, unsalted walnuts for this recipe since Parmesan cheese tastes quite salty on its own.

For extra flavor, you can toast the walnuts in a frying pan (without oil, just use heat!) or in the oven. However, I think raw walnuts work perfectly well here. Technically, you can use any nut you’d like in this homemade pesto recipe (pecans, macadamia nuts, almonds, etc), but we like walnuts for their neutral flavor and good price.

How to freeze pesto

Pesto freezes beautifully. I recommended 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!

Looking for more easy pesto recipes?

This recipe is…

Vegetarian and gluten-free.

clock clock icon cutlery cutlery icon flag flag icon folder folder icon instagram instagram icon pinterest pinterest icon print print icon squares squares icon

Walnut Pesto with Basil

1 Star2 Stars3 Stars4 Stars5 Stars (38 votes, average: 4.00 out of 5)

  • Author: Sonja Overhiser
  • Prep Time: 10 minutes
  • Cook Time: 0 minutes
  • Total Time: 10 minutes
  • Yield: 3/4 cup 1x


This homemade walnut pesto comes together in less than 10 minutes and can be frozen for up to six months. Perfect for sandwiches, soups, and more!



  • 1/4 cup walnuts
  • 1/2 cup Parmesan cheese, large grated
  • 2 medium garlic cloves
  • 3 cups loosely packed fresh basil
  • 1 tablespoon fresh lemon juice
  • 1/4 teaspoon kosher salt
  • 1/4 cup olive oil


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.

  • Category: Sauce
  • Method: Raw
  • Cuisine: Italian

Keywords: walnut pesto, walnuts, basil pesto, how to make pesto, pesto with lemon, lemon juice


Subscribe for free weekly recipes & more!

About the Authors

Sonja Overhiser

Cookbook Author and writer

Sonja Overhiser is author of Pretty Simple Cooking, named one of the best healthy cookbooks of 2018. She’s host of the food podcast Small Bites and founder of the food blog A Couple Cooks. Featured from the TODAY Show to Bon Appetit, Sonja seeks to inspire adventurous eating to make the world a better place one bite at a time.

Alex Overhiser

Cookbook Author and photographer

Alex Overhiser is an acclaimed food photographer and author based in Indianapolis. He’s host of the food podcast Small Bites and founder of the recipe website A Couple Cooks. Featured from the TODAY Show to Bon Appetit, Alex is author of Pretty Simple Cooking, named one of the best vegetarian cookbooks by Epicurious.


  • Reply
    Tristan @ Enjoy Life
    September 4, 2010 at 8:20 pm

    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!

  • Reply
    September 30, 2010 at 6:10 pm

    this recipe is yummy, but any tips on freezing pesto for the winter??

  • Reply
    August 12, 2011 at 1:24 pm

    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.

    • Reply
      Lynett Oliver
      August 12, 2011 at 6:45 pm

      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.

      • Reply
        August 12, 2011 at 9:02 pm

        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!

        • Reply
          Rebecca Young
          August 12, 2011 at 10:55 pm

          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!

  • Reply
    Lynett Oliver
    August 13, 2011 at 10:01 pm

    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.

    • Reply
      August 14, 2011 at 8:24 am

      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?

  • Reply
    August 26, 2011 at 10:08 pm

    I’ve always made my pesto with sunflower seeds. Money-saving alternative to pine nuts, and also works for those with nut allergies!

  • Reply
    August 31, 2011 at 10:25 pm

    Sounds easy to make. I love pesto and use it on pizza, in pastas and sandwiches.

  • Reply
    October 20, 2012 at 4:05 pm

    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.

  • Leave a Reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.