Homemade Basil Pesto – Vegan-Friendly Recipe

Homemade basil pesto is an easy, flavorful sauce that far outshines most store-bought versions. Bright, creamy, and packed with fresh herb flavor, this pesto takes just minutes to make and pairs beautifully with pasta, grilled proteins, vegetables, sandwiches, salads, and more.

Homemade basil pesto in a small speckled bowl with a spoon dipping in.

The best basil pesto recipe

Pesto is a staple sauce for a reason: it’s versatile, fast to prepare, and full of fresh green flavor. A batch of homemade basil pesto can transform a weeknight meal—stir it into pasta, spoon it over roasted vegetables, or use it as a bright finishing sauce for fish, chicken, and steak. Make extra and freeze portions so you always have a flavorful shortcut on hand.

We use this pesto on a wide variety of dishes, including pasta and gnocchi, pizza, sandwiches, grilled salmon or chicken, roasted or grilled vegetables, eggs, salads, and soups. Because it takes only minutes to make, it’s an easy way to add a fresh, herbal punch to many recipes.

Why you’ll love this pesto

  • Bright, herb-forward flavor from fresh basil
  • Creamy texture from nuts and cheese (or substitutes)
  • Ready in about 5 minutes
  • Easily adapted for vegan, dairy-free, or nut-free diets
  • Freezes well for quick meal prep
  • Incredibly versatile—works with many cuisines
Homemade basil pesto in a food processor container with a spoon dipping into the sauce.
Ingredients for homemade basil pesto in various ceramics on a cream colored background.

Ingredients and substitutions

This recipe follows the classic basil pesto formula but remains flexible—swap ingredients to suit your taste or dietary needs. Below are the standard ingredients and sensible substitutions so you can make pesto even if your pantry looks different.

What you need

  • Fresh basil: The traditional base for pesto. You can also blend basil with other tender greens or herbs—parsley, spinach, arugula, cilantro, or chives work well mixed with basil. For stronger herbs like dill or tarragon, combine them with milder greens to balance the flavor.
  • Pine nuts: Offer a rich, creamy texture. More affordable alternatives include walnuts, cashews, almonds, or pistachios.
  • Parmesan cheese: Adds savory depth and umami. For a dairy-free option, use nutritional yeast or omit the cheese.
  • Garlic: One clove brightens the pesto—omit if needed for allergy reasons or reduce to taste.
  • Kosher salt: Adjust to taste to enhance the flavors.
  • Olive oil: Use a good-quality extra-virgin olive oil to emulsify and carry the flavors.

How to make this pesto vegan / dairy free

To make a vegan/dairy-free pesto, replace the grated parmesan with 1–3 tablespoons of nutritional yeast for a cheesy, nutty note, or leave the cheese out entirely. Nutritional yeast gives a satisfying savory flavor without dairy.

Can you make this pesto without nuts?

Yes—substitute toasted sunflower seeds or pumpkin seeds (pepitas) for a nut-free version. Toasting the seeds briefly in a dry skillet deepens their flavor and improves the texture.

How to make homemade basil pesto: Ingredients for pesto in a food processor container before processing.
How to make homemade basil pesto: Basil, parmesan, pine nuts, and garlic chopped up in the food processor before adding olive oil.
How to make homemade basil pesto: Finished creamy pesto in the bowl of food processor.
How to make homemade basil pesto: Finished creamy pesto in the bowl of food processor with a spoon scooping some out.

How to make basil pesto

Fresh ingredients and a food processor (or blender) are all you need for excellent pesto. The process is fast and forgiving—pulse and taste as you go.

Step-by-step

  • Combine the aromatics and nuts: Add packed fresh basil leaves, the nuts of your choice, grated parmesan (or nutritional yeast for vegan), garlic, and kosher salt to the food processor. Pulse until the mixture is finely chopped, stopping to scrape the sides as necessary.
  • Emulsify with olive oil: With the motor running, slowly pour in the olive oil until the sauce becomes smooth and emulsified. Adjust the oil amount for your preferred consistency—less for a chunkier pesto, more for a saucier finish.
  • Season and store: Taste and add more salt or a squeeze of lemon if you want extra brightness. Use immediately or transfer to an airtight container. A thin layer of olive oil on top helps prevent browning in the fridge.
Super close up shot of the texture of homemade basil pesto.

Serving suggestions

This pesto is adaptable—use it as a sauce, spread, or finishing touch. Here are a few delicious ideas:

  • Tossed with pasta, gnocchi, or warm grains
  • Swirled into risotto for a bright finish
  • Spread on toasted bread or a sandwich (excellent with tomato and fresh mozzarella)
  • Mixed into mayonnaise for a pesto aioli
  • Spoon over baked or grilled salmon, chicken, or steak
  • Served alongside or on top of roasted or grilled vegetables
  • Used as a pizza sauce base or drizzled over a pizza after baking
  • Added to dressings or vinaigrettes for extra herb flavor
Pesto pasta made with spaghetti in a speckled ceramic bowl with a fork twirling a bite, topped with pine nuts and grated parmesan.

Storage and freezing

Refrigerator: Store pesto in an airtight container for up to one week. Pour a thin layer of olive oil over the surface to limit oxidation and keep the bright green color longer.

Freezing: Pesto freezes exceptionally well. Freeze in ice cube trays or small containers for portioned use—pop a cube into pasta, soups, or sauces whenever you need a flavor boost.

Pinterest pin for homemade basil pesto

Notes and variations

  • Vegan option: Substitute parmesan with about 2 tablespoons of nutritional yeast for a nutty, cheesy flavor, or leave the cheese out entirely.
  • Nut-free option: Use toasted sunflower or pumpkin seeds instead of nuts.
  • Blender method: If using a blender, add ingredients with the olive oil and process, stopping to scrape the sides as needed. A tall blender with a tamper will help keep ingredients moving.
  • Flavor boosts: A squeeze of lemon juice brightens the pesto. Add red pepper flakes for heat or swap some basil for baby spinach if you need more volume.

Recipe details

  • Total time: about 5 minutes
  • Yield: about 8 servings (varies by how much you use per serving)
  • Method: food processor or blender
  • Cuisine: Italian-inspired

If you enjoyed this pesto, try making extra and experimenting with different nuts, greens, or cheeses to find your favorite variation. Fresh pesto is a small effort with a big payoff—brightening countless meals with minimal time and effort.