This pesto takes about 10 minutes to make, costs about the same as a jar of good store-bought pesto, and is easy for any home cook. You can skip the pine nuts entirely and still get a thick, creamy, basil-forward sauce that works on pasta, sandwiches, and eggs. The trick is choosing a nut or seed that stays mild and lets the basil and garlic shine.
Choose Your Substitute
Pine nuts are soft, buttery, and mild, so the best substitutes are other nuts or seeds with a similar gentle flavor. Walnuts are the most common swap because they are cheap and blend into a creamy sauce, though they add a slightly earthy taste. Almonds (whole or slivered) give a firmer texture and a mild, sweet flavor. Cashews are the closest in creaminess but cost more. Sunflower seeds are the best seed option, especially if you need a nut-free pesto, and they make a smooth, mild sauce. For a truly neutral base, use raw pumpkin seeds (pepitas), which blend into a thick paste without much flavor of their own.
Toast the nuts or seeds in a dry skillet over medium heat for 3-5 minutes, shaking often, until fragrant and lightly golden. This deepens their flavor and helps them blend more smoothly. Let them cool for a few minutes before adding to the food processor.
Measure the Ingredients
This recipe makes about 1 cup (240 ml) of pesto, enough for 4 servings of pasta or about 8 sandwiches. Use the table below to see how the substitute changes the flavor and texture.
| Substitute | Amount | Flavor / Texture |
|---|---|---|
| Walnuts | 1/3 cup (40 g) | Earthy, creamy |
| Almonds (slivered) | 1/3 cup (45 g) | Mild, slightly crunchy |
| Cashews | 1/3 cup (45 g) | Sweet, very creamy |
| Sunflower seeds | 1/3 cup (45 g) | Neutral, smooth |
| Pumpkin seeds | 1/3 cup (45 g) | Mild, thick |
If you use roasted and salted nuts, skip the extra salt in the recipe and taste before adding more.
Blend the Pesto
Here is the full method, from measuring to storing.
- Toast the substitute nuts or seeds in a dry skillet over medium heat for 3-5 minutes, shaking often, until fragrant and lightly golden. Let cool completely.
- In a food processor, combine the cooled nuts or seeds, 2 cups (packed, about 60 g) fresh basil leaves, 1 small garlic clove (or 1/2 tsp minced), and 1/4 cup (25 g) grated Parmesan cheese.
- Pulse 8-10 times until the mixture is finely chopped and looks like coarse sand.
- With the processor running, drizzle in 1/3 cup (80 ml) extra-virgin olive oil in a steady stream. Stop and scrape down the sides once or twice.
- Add 1/2 teaspoon salt and 1/4 teaspoon black pepper (or to taste). Pulse 3-4 more times until the pesto is thick but still has a little texture. Do not over-blend into a paste.
- Taste and adjust: add more salt if needed, or a squeeze of lemon juice (about 1 tsp) to brighten the flavor.
If you prefer a thinner pesto, add another tablespoon of olive oil. If you like it thicker, use 1/4 cup (60 ml) oil instead.
Fix the Texture
Pesto can come out too thick, too thin, or too bitter. Here is how to fix each problem.
| Symptom | Cause | Fix |
|---|---|---|
| Too thick / pasty | Over-blended or too little oil | Add 1-2 tbsp warm water or extra oil and pulse briefly |
| Too thin / oily | Too much oil or hot basil | Add more nuts or cheese, pulse to thicken |
| Bitter taste | Old olive oil or over-toasted nuts | Add a pinch of sugar or a little lemon juice; next time use fresher oil and toast nuts until just golden |
| Brown color | Oxidation from air | Press plastic wrap directly on the surface and refrigerate; use within 4 days |
Use It on Pasta and More
Stir the pesto into hot pasta right after draining, using about 1/4 cup (60 ml) per 8 oz (225 g) of cooked pasta. Add a splash of pasta water to loosen it if needed. Pesto also works as a spread on sandwiches, a topping for grilled chicken or fish, or a swirl into soups. For a quick dinner, toss it with cooked spaghetti, cherry tomatoes, and a little reserved pasta water.
If you want a dairy-free version, replace the Parmesan with 2 tablespoons of nutritional yeast or just leave it out; the sauce will be thinner and less salty, so add more salt to taste.
Store and Freeze
Keep pesto in a sealed container in the refrigerator for up to 4 days. Because it contains garlic and basil, it must stay cold to prevent bacterial growth; never leave it at room temperature for more than 2 hours. Press a layer of plastic wrap directly on the surface to keep it green.
To freeze, spoon the pesto into an ice cube tray, freeze until solid, then pop the cubes into a freezer bag. Frozen pesto keeps for up to 3 months. Thaw a cube in the refrigerator or add it directly to hot pasta. The texture may be slightly more watery after thawing, so stir in a little extra olive oil or Parmesan.
When It Goes Wrong
If your pesto tastes flat, it usually needs more salt or acid. Add a pinch of salt and a drop of lemon juice, then taste again. If it is too garlicky, add more basil or nuts to balance it. If the basil leaves are wilted or old, the pesto will taste less vibrant; use fresh, bright green leaves for the best result.
If you are allergic to tree nuts, use sunflower seeds or pumpkin seeds, and check that your Parmesan is nut-free (some imported cheeses are washed with nut-based products, so read the label).
Spotted a mistake? Tell us and we will correct it. How we write and check articles.