Homemade Classic Basil Pesto Recipe for Pasta & Sandwiches

This post explains how to make classic basil pesto, the best ways to store it, and practical tips for using and preserving homemade pesto. If you haven’t made pesto at home yet, you’re in for a treat.

Pesto is a perfect summer recipe to use up abundant basil from the garden. Fresh basil seems to multiply overnight, and homemade pesto is one of the easiest and most delicious ways to enjoy it.

a photo of a jar of homemade pesto sauce on a wooden plate with a gold spoon next to it.

Homemade Basil Pesto Sauce Recipe

I didn’t try pesto until college, but when I did I loved it immediately — nutty, cheesy, and incredibly fresh. Now we make pesto regularly and use it in many ways: tossed with pasta, spread on sandwiches, or as a sauce for pizza and chicken. This article shares our favorite classic pesto recipe and simple storage methods to keep it vibrant.

A photo of a jar of homemade pesto taken from above the jar.

Basil Pesto Recipe Ingredients

This basic pesto requires just a handful of quality ingredients. Use the freshest basil you can find for the brightest flavor. The ingredient list:

  • Fresh basil (packed)
  • Garlic cloves
  • Pine nuts (or walnuts, almonds, cashews as substitutes)
  • Extra virgin olive oil
  • Grated Parmesan cheese (Pecorino Romano makes a good substitute)
  • Salt, to taste

Exact measurements are included in the recipe card below.

How to Make Pesto Sauce

Start by toasting the pine nuts and garlic in a dry skillet over medium heat. Toast the pine nuts until golden, shaking the pan occasionally for even color. Remove the nuts, then continue to toast the garlic in its thin skin until golden — the skin will slip off more easily once toasted.

Allow the garlic and pine nuts to cool. Add the basil, toasted nuts, garlic, and olive oil to a food processor or blender and pulse until mostly smooth but still slightly textured. Transfer to a bowl, then stir in the grated cheese and salt to taste. For an authentic, old-world method, use a mortar and pestle, but a food processor saves time and gives excellent results.

a photo of a jar of pesto sauce with a gold spoon scooping some out. the jar is on a wooden plate and has some pine nuts and fresh basil leaves on it.

How to Store Pesto

Storing Pesto in a Jar

Pack pesto into a clean jar almost to the top, then drizzle a thin layer of olive oil over the surface before sealing. The oil creates a barrier that helps keep the herbs green and fresh. Stored this way in the refrigerator and kept covered with oil, pesto will keep for a couple of weeks. You can freeze a jar, too, but plan to move it to the refrigerator after a month for best texture.

Storing Pesto in a Vacuum Bag

Vacuum sealing is one of the best long-term storage options. Place portions of pesto in vacuum-seal bags, remove the air, and freeze. Properly vacuum sealed and frozen, pesto can keep for several months without significant color loss. When ready to use, thaw in the refrigerator before serving.

How Long Does Pesto Last?

Fresh basil pesto will generally last up to 5 days in the refrigerator in an airtight container. Covering the top with a thin layer of olive oil can extend the refrigerator shelf life.

Can You Freeze Pesto?

Yes — pesto freezes very well. Spoon pesto into an airtight container or freezer bag and freeze. A convenient method is to freeze pesto in ice cube trays; once frozen, transfer the cubes to a labeled freezer bag. This gives you single-serving portions that thaw quickly and are perfect for adding to pasta, soups, or sauces.

a photo of a jar of homemade pesto sauce on a wooden plate with a gold spoon next to it.

Our Favorite Pesto Uses

Pesto is versatile: use it on eggs, mixed into pasta, spread on grilled cheese, brushed on vegetables before grilling, or as a finishing sauce for chicken and fish. Here are a few ideas for inspiration:

  • Cheesy pesto pasta
  • Pesto pizza or grilled pizza
  • Pesto grilled cheese or bacon-pesto sandwiches
  • Grilled veggies with pesto
  • Pesto veggie foil packs for the grill
  • Pesto tarts and flatbreads
a photo of a glass jar of homemade pesto sauce on a wooden plate with a gold spoon laying next to the jar.

Tips for the Best Pesto Sauce

  • Chill the food processor bowl or add a few ice cubes briefly before blending to keep the basil bright green.
  • Use the best quality ingredients you can: fresh basil, good extra virgin olive oil, and freshly grated Parmesan or Pecorino.
  • Adjust garlic and nuts to taste — fewer cloves if you prefer a milder garlic flavor, or substitute nuts to suit what you have on hand.

Other Italian Sauce Recipes

If you enjoy pesto, try other Italian-style sauces next time you cook: traditional Bolognese, homemade spaghetti sauce, easy pizza sauce, vegetable marinara, beef ragu, or alternative pesto styles like cilantro or avocado pesto.

Classic Pesto Recipe

Prep: 1 min • Cook: 3 mins • Total: 4 mins • Servings: 1

Simple, classic basil pesto — nutty, cheesy, and bright.

Ingredients

  • 1/4 cup pine nuts, plus 1 1/2 tablespoons
  • 3 cloves garlic, unpeeled
  • 3 cups fresh basil, packed
  • 1/4 cup olive oil, plus 1–2 tablespoons
  • 1/4 cup Parmesan cheese, plus 2 tablespoons, grated
  • Salt, to taste

Instructions

  1. Heat a skillet over medium heat and add the pine nuts and garlic.
  2. Toast until the pine nuts are golden, shaking the pan occasionally.
  3. Remove the pine nuts and continue to toast the garlic until golden.
  4. Remove garlic, let cool, then peel the skins off.
  5. Once cooled, place basil, pine nuts, garlic, and olive oil in a blender or food processor and pulse until mostly smooth but slightly grainy.
  6. Transfer to a bowl, stir in the Parmesan, and salt to taste. Store as directed above.

Recipe Notes

  • Adjust the garlic amount to taste — use 2 cloves if you prefer a subtler garlic flavor.
  • See the storage section for details on preserving pesto in a mason jar topped with olive oil.

Nutrition

Serving: 0.5 cup • Calories: 842 kcal (approximate)

REMEMBER TO SUBSCRIBE to the Oh Sweet Basil newsletter to receive recipes delivered to your inbox.

When you try a recipe, tag your photos with #ohsweetbasil on Instagram for a chance to be featured.

a photo of a jar of homemade pesto sauce on a wooden plate with a gold spoon next to it.