Homemade Spinach Pesto Recipe for Pasta and Sandwiches

This Spinach Pesto recipe offers a fresh take on classic pesto. Combining baby spinach, basil, toasted walnuts, parmesan, lemon zest and juice, and olive oil, this vibrant sauce comes together in minutes. It’s excellent for meal prep, versatile across many dishes, and freezes well for longer storage.

Spinach pesto in a jar with olive oil on top

Pesto is one of those go-to sauces that adapts to what you have on hand. Once you learn how to make a basic pesto, you’ll find it’s easy to swap greens, herbs, nuts, and cheeses to create new flavors. This spinach walnut pesto is a favorite because baby spinach is often available year-round and lends a mild, nutrient-rich base that pairs beautifully with lemon and toasted walnuts.

I first developed this spinach-forward pesto while in culinary school as part of a composed-dish exam. I paired it with roasted butternut squash in a galette and received great feedback from my instructor. Since then I’ve used the recipe for pastas, sandwiches, salads, and as a bright finishing sauce for grilled proteins and vegetables.

Spinach walnut pesto in a jar with a spoon alongside

Why you’ll love this recipe:

  • Spinach walnut pesto is a delicious variation of classic basil pesto, offering a fresh, green flavor and added nutrients from baby spinach.
  • Basil is optional—this recipe works well with or without it, and you can substitute other herbs or greens if needed.
  • It pairs with seafood, pasta, chicken, grilled vegetables, sandwiches, and more.
  • Make it ahead for quick weeknight meals or freeze portions for up to three months.

Recipe ingredients

There are just a handful of ingredients in this spinach basil pesto, and most can be adjusted to taste.

Spinach pesto ingredients
  • Spinach: Use fresh baby spinach for the best texture and flavor.
  • Basil: Optional—swap with more spinach or other herbs if you don’t have fresh basil.
  • Lemon: Fresh lemon zest and juice brighten the sauce—avoid bottled juice for best flavor.
  • Parmesan: Freshly grated from a block yields the best taste.
  • Walnuts: Toasting the walnuts enhances their flavor and gives the pesto a pleasant richness; you can substitute other nuts or seeds if desired.

Full ingredient amounts are provided in the recipe card below.

How to make this recipe

Homemade spinach pesto is quick: combined in a food processor or high-speed blender, the ingredients transform into a silky, vibrant sauce in moments.

Pro tip: Make the pesto 2–3 days ahead to speed up weeknight meals.

See the recipe card below for detailed measurements and a printable version of the steps.

How to make spinach pesto collage
  1. Preheat the oven to 350°F (175°C). Spread the walnut pieces on a rimmed baking sheet and toast for 8–10 minutes, until they are fragrant and lightly golden. Let cool slightly.
  2. In the bowl of a food processor, combine baby spinach, basil leaves (if using), minced garlic, lemon zest and juice, toasted walnuts, and freshly grated parmesan. Pulse until the mixture is roughly chopped.
  3. With the processor running, slowly pour in the olive oil through the feed tube until the pesto reaches your desired consistency—chunky or smooth. Taste and season with salt and pepper, then pulse once more to combine.

Recipe FAQs

Can I prep this recipe in advance?

Yes. Store homemade spinach pesto in an airtight container in the refrigerator for up to one week. For longer storage, freeze in portions for up to three months.

How long does fresh pesto last in the fridge?

Properly stored, fresh pesto will keep for up to seven days in the refrigerator.

What can I use instead of pine nuts?

Pine nuts can be substituted with walnuts, almonds, pepitas, or sunflower seeds. Toast the nuts or seeds for the best flavor.

Serving suggestions

This spinach walnut pesto is versatile. Make a batch on the weekend and use it in many ways during the week:

  • Toss with pasta and cooked chicken for a quick weeknight meal.
  • Drizzle over grilled or roasted chicken, fish, pork, or steak.
  • Stir into warm roasted vegetables or use as a dip for crudités.
  • Mix with shredded chicken for a vibrant pesto chicken salad.
  • Spread on toasted bread or sandwiches, or serve alongside a simple salad for a light meal.

Recipe notes

  • Make ahead: The pesto can be prepared 2–3 days in advance and refrigerated for up to one week.
  • Freezing: Freeze pesto in an airtight container or in an ice cube tray for individual portions. Wrap or seal tightly and thaw as needed.
  • Herb swaps: If you don’t have basil, use the same amount of extra spinach or try parsley, arugula, or other tender greens.
  • Consistency: For a thinner pesto, add 1–2 more tablespoons of olive oil or a splash of reserved pasta cooking water when tossing with pasta.
Spinach pesto in a jar with lemon, walnuts and basil alongside

More pesto recipes you’ll love:

  • Pesto pasta salad
  • Mushroom ravioli with pesto and toasted walnuts

Did you try this recipe? If so, leave a review below and tag me @flavorthemoments on social media so I can see what you made.

Spinach pesto in a jar with olive oil on top

Spinach Pesto Recipe

Servings:
8
servings
Prep Time: 15 mins
Cook Time: 0 mins
Total Time: 15 mins
This Spinach Pesto recipe is a bright, easy variation of classic pesto. It includes baby spinach, walnuts and lemon for a fresh, versatile sauce—perfect tossed with pasta, spread on sandwiches, or drizzled over meats and vegetables. It’s simple to make and ideal for meal prep.

Equipment

  • Food processor or high-speed blender (approx. 7 cup capacity recommended)
  • Rimmed baking sheet (for toasting nuts)
  • Microplane or fine grater (for lemon zest and parmesan)

Ingredients

  • 1/4 cup walnut pieces
  • 4 cups baby spinach
  • 1/2 cup basil leaves (optional)
  • 1 clove garlic, minced
  • 1 tablespoon lemon zest
  • 2 tablespoons fresh lemon juice
  • 1/4 cup freshly grated parmesan
  • 6 tablespoons extra virgin olive oil (adjust to reach desired consistency)
  • Salt and pepper, to taste

Instructions

  1. Preheat the oven to 350°F (175°C). Spread walnut pieces on a rimmed baking sheet and toast for 8–10 minutes, until golden and fragrant. Allow to cool slightly.
  2. Combine the spinach, basil (if using), minced garlic, lemon zest and juice, toasted walnuts, and parmesan in the bowl of a food processor.
  3. Pulse the mixture until roughly chopped. With the processor running, slowly add the olive oil through the feed tube until the pesto reaches your preferred texture.
  4. Taste and season with salt and pepper. Pulse briefly to incorporate and serve, or store in an airtight container in the refrigerator.

Notes

  • Prepare the pesto 2–3 days ahead for easy meal prep.
  • Freeze portions in an ice cube tray for convenient single servings.
  • Substitute basil with extra spinach or other soft herbs if desired.
  • For a thinner sauce, add an extra 1–2 tablespoons of olive oil.

Nutrition (per 2 tablespoons)

Calories: 81 kcal; Carbohydrates: 5 g; Protein: 4 g; Fat: 6 g; Saturated Fat: 1 g; Polyunsaturated Fat: 5 g; Cholesterol: 3 mg; Sodium: 157 mg; Fiber: 2 g; Sugar: 1 g.

Nutrition is estimated using a food database and is intended as a guideline only.

Course: Condiments/Dressing
Cuisine: Italian
Author: Marcie
All recipes and images © Flavor the Moments.
Did you try this recipe?
Tag @flavorthemoments and use the hashtag #flavorthemoments on social media so the author can see your version.

This recipe was originally published in May 2015. The photos and step-by-step instructions have been updated to provide clearer guidance and more recipe information.