This basil walnut pesto recipe is gonna be your new favorite basil-based condiment! I swapped the fancy (aka expensive) pine nuts for toasted walnuts and kept all the good stuff like fresh basil, classic parm, and fresh garlic. The result? A super flavorful basil pesto everyone will love, including your wallet.

When toasted, the walnuts bring a deep and complex flavor to the pesto, which pairs really nicely with the other flavors in classic pesto sauce. This pesto is based on a recipe I learned when I worked at a popular Central Florida barbecue spot called Yellow Dog Eats Café (which sorta always sounded like a newspaper headline gone wrong to me 🤣). We used it in our marinated mozzarella antipasto salad, and people went crazy for it!
While I no longer have the exact recipe, this one builds off the parts I do remember and my other pesto recipes, like my sunflower seed pesto spread and my lemon parmesan pesto. Use this pesto on your favorite pizzas, spread on top of sandwiches or even to make a pesto compound butter to top your morning toast. It’s also the perfect accompaniment to any happy hour snack spread, and if that weren’t enough, it doubles as a pasta sauce in recipes like classic pasta alla pesto, too!
why this walnut pesto recipe works:
🤤 complex flavor. Toasted walnuts bring a deep, nutty taste that pairs beautifully with the classic pesto ingredients.
🙌 restaurant quality recipe. This recipe is tried and tested in both my kitchen and the commercial kitchen of a popular restaurant, so you KNOW it’s good!
💰 budget-friendly alternative. Walnuts provide a cost-effective substitute for expensive pine nuts while maintaining that classic pesto texture and taste.
🛒 ingredients
See the recipe card for the exact quantities.
🍳 instructions
1: Toast walnuts in a dry skillet over medium heat until fragrant.
2: Add toasted walnuts, garlic, and parmesan to food processor and pulse until finely chopped.
3: Add fresh basil leaves and lemon juice to the food processor.
4: With the processor running, slowly stream in olive oil until combined.
5: Add salt and pepper to taste.
6: Pulse a few more times until smooth but still slightly textured. Store in a jar topped with olive oil to keep the pesto from oxidizing.
Wanna save this recipe for later? 📬
💡tips & tricks for getting it right
🍽️ how to use pesto
- in pasta – I love using pesto as a seasonal pasta sauce instead of tomato-based sauces. This pesto is wonderful in this Italian ricotta and pesto pasta and classic pasta al pesto.
- on pizza – top your favorite fresh pizza dough with this pesto for a fresh take! You can also make mini pizzas which are perfect appetizers!
- with appetizers – speaking of snacks, you can whip up a batch of pesto compound butter for rolls, or you can put a small bowl of pesto on a cheese board for a spread!
ℹ️ troubleshooting tips
- turning brown – fresh basil can oxidize quickly, turning the pesto a darker brown color. Adding a thin layer of olive oil on top before storing helps prevent this.
- too thick or chunky – not processing the ingredients long enough or adding them in the wrong order can result in uneven texture. Make sure to pulse the dry ingredients first before slowly streaming in the olive oil.
- bitter taste – Using old or rancid walnuts can make your pesto taste bitter. Always taste one or two walnuts before cooking with them to make sure they’re fresh.
♻️ swap ingredients
- use a different type of nut or seed – I’ve got plenty of pesto variations, like this nut-free pesto with sunflower seeds or this super cheesy pesto using pine nuts! You can also use almonds, too!
🧰 equipment needed & storage tips
🫙 storing pesto
Store homemade pesto in an airtight container in the refrigerator. To prevent browning, add a thin layer of olive oil on top before sealing. You can also freeze pesto in ice cube trays for up to 6 months – once frozen, transfer the cubes to a freezer bag for easy portioning.
💬 q+a
How long will my pesto stay fresh?
You can store this pesto in an airtight container in the refrigerator, and adding a thin layer of olive oil on top before sealing helps prevent browning. For longer storage, you can freeze it in ice cube trays for up to 6 months and transfer the frozen cubes to a freezer bag.
Why is my pesto turning brown?
This is due to the basil oxidizing. You can prevent this by adding a layer of olive oil on top before storing.
Why does my pesto taste bitter?
If your pesto tastes bitter, it might be due to using old or rancid walnuts. Always taste a couple of walnuts before using them to ensure they’re fresh.
If you make this recipe, please leave a review in the comments and a star rating!
⭐️⭐️⭐️⭐️⭐️
I read every single comment! I also love connecting on social media, so snap a pic and hashtag it #myrecipeforfun and tag me on Instagram, TikTok, or pin this recipe on Pinterest!
Basil Walnut Pesto (Classic Pesto with Walnuts)
Wanna save this recipe for later? 📬
Equipment
- 1 food processor
- 1 spatula or spoon
- 1 storage jar
Ingredients
- 35 g walnuts about 1/3 cup, toasted
- 8 g garlic 2 medium cloves
- 50 g parmesan cheese small chunks or freshly grated, about 1/3 cup
- 100 g fresh basil leaves 2 packed cups
- 50 g extra virgin olive oil 1/2 cup
- 15 g fresh lemon juice about 1 tablespoon
- kosher salt to taste
- black pepper to taste
Instructions
- Toast walnuts. Toast walnuts in a dry skillet over medium heat for 5 minutes, stirring frequently, until lightly browned. Let cool completely.35 g walnuts
- Combine walnuts and garlic. In a food processor, combine the cooled toasted walnuts and garlic. Pulse until finely chopped.8 g garlic, 35 g walnuts
- Add cheese. Add parmesan cheese and pulse to combine.50 g parmesan cheese
- Add basil and lemon. Add basil leaves and lemon juice. Pulse until roughly chopped.100 g fresh basil leaves, 15 g fresh lemon juice
- Drizzle in oil. With the food processor running, slowly drizzle in the olive oil until the desired consistency is reached. You might not use all the oil, so just use as much as you need.50 g extra virgin olive oil
- Season to taste. Season with salt and black pepper to taste.kosher salt, black pepper
- Store. Store finished pesto in a jar topped with a layer of olive oil to keep it from oxidizing.
Nutrition Information
The information provided is an estimate based on an online nutrition facts calculator and actual nutrition facts may vary.