What Is Pesto and What Is It Made Of?
Quick answer
Pesto is an uncooked sauce of fresh basil, garlic, pine nuts, Parmesan and olive oil, blended into a bright green paste, Oregon State Extension explains. It comes from Italy and is best known tossed with pasta, but it's also great on sandwiches, chicken, eggs and vegetables. Homemade pesto must be refrigerated and used within 4 days, or frozen for longer storage.

Handy for this: Cups to tablespoons · Grams to cups
At a glance
- Pesto is basil, garlic, pine nuts, Parmesan and olive oil.
- Pulse nuts and garlic first, then the basil.
- Add cheese and salt, then oil to taste.
- Toss it with hot pasta and a splash of pasta water.
- Refrigerate homemade pesto up to 4 days.
- Freeze it in ice cube trays for longer.
- Don't can pesto or keep it at room temperature.
The short version
Pesto is a raw sauce: nothing in it is cooked. Oregon State Extension describes it as an uncooked seasoning of fresh basil, garlic, pine nuts and oil, and most recipes add Parmesan. Classic basil pesto comes from the Genoa region of Italy, but the idea works with other greens and nuts too; Oregon State's basic recipe allows parsley, spinach or carrot tops, and sunflower seeds or walnuts in place of pine nuts.
“The pasta is drained. Toss in the pesto off the heat and add a splash of pasta water.”
How to make pesto
Oregon State's basic method: finely chop ¼ cup pine nuts and 3 garlic cloves in a food processor. Add 2 cups of fresh greens such as basil and chop very fine. Add ¼ cup grated Parmesan and ¼ teaspoon salt and mix well. Then add ¼ cup olive oil and blend, adding more oil until you like the texture. Toasting the nuts first deepens the flavor.
How to use pesto
| Use | How |
|---|---|
| Pasta | Toss with hot pasta off the heat; loosen with pasta water |
| Chicken or fish | Spread on before baking, or spoon on after |
| Sandwiches | Rutgers suggests stirring it into light mayonnaise |
| Bread dip | Swirl into olive oil |
| Eggs | Dollop on scrambled eggs or a frittata |
| Soups and sauces | Drop in a frozen cube at the end |
How long does pesto last?
Fresh garlic and herbs in oil are low-acid foods that can carry Clostridium botulinum spores, Oregon State Extension explains, so homemade pesto must be refrigerated and used within 4 days, or frozen. Never keep it at room temperature, and don't can it; Oregon State notes there's no research on safe canning times for pesto. Store-bought jars have their own date; follow the label once opened.
How to freeze pesto
Spoon pesto into ice cube trays, or drop tablespoons onto foil, and freeze until firm. Rutgers Cooperative Extension then moves the frozen portions to a labeled freezer bag and keeps them up to 6 months. Thaw a cube about 20 minutes before using, or drop it straight into hot soup or sauce. Press out the air from the bag to prevent freezer burn.
Allergens and common mistakes
Pesto usually contains tree nuts and milk from the cheese, two of the nine major allergens the FDA lists. Sunflower seeds make a nut-free version.
- Cooking pesto in the pan. High heat turns basil dark and bitter; add it off the heat.
- Overblending. Pulse so it stays bright, not pasty.
- Leaving it out. Refrigerate within 2 hours.
- Keeping it a week. Freeze what you won't use in 4 days.
Keep going
Next up: How to Cook Pasta, How to Toast Nuts Without Burning Them and How to Mince Garlic Quickly, Plus How to Peel It.
Pan watches it for you
Pan times the pasta for you
Making pesto pasta? Pan watches the pot through your phone camera and tells you out loud when the pasta's ready to drain and toss.
- Nuts and garlic first
- Then basil and cheese
- Oil to taste
- Off the heat for pasta
Pan AI is on iPhone • Android.
Common questions
What does pesto taste like?
Fresh, herby and garlicky, with nutty richness from pine nuts and saltiness from Parmesan.
Is pesto cooked?
No. It's an uncooked sauce; add it to hot food off the heat.
How long does homemade pesto last in the fridge?
Oregon State Extension says up to 4 days; freeze it for longer.
Can you freeze pesto?
Yes. Freeze it in ice cube trays, then store the cubes in a freezer bag for up to 6 months.
How do you make pesto?
Oregon State Extension: finely chop 1/4 cup pine nuts and 3 garlic cloves, add 2 cups fresh basil and chop very fine, mix in 1/4 cup grated Parmesan and 1/4 teaspoon salt, then blend in 1/4 cup olive oil, adding more to taste.
Can you make pesto without pine nuts?
Yes. Oregon State's basic recipe allows sunflower seeds or walnuts in place of pine nuts, and parsley, spinach or carrot tops in place of some basil.
Can you can pesto or keep it at room temperature?
No. Keep homemade pesto in the refrigerator and use it within 4 days, or freeze it in ice cube trays for longer storage.
Sources
- USDA FSIS: Leftovers and Food Safety
- FoodSafety.gov: Safe Minimum Internal Temperatures
- Oregon State University Extension: Herbs and Vegetables in Oil (SP 50-701)
- Rutgers Cooperative Extension: Mixed Herb Pesto
- FDA: Food Allergies
Reviewed against USDA FSIS, FoodSafety.gov and Oregon State University Extension guidance. How we choose sources and fix mistakes: editorial policy.
Keep cooking
- Start hereHow to Cook PastaHow to cook pasta: 4 quarts of well-salted, rolling water per pound, stirred often, 8–12 minutes to al dente. Exact times for every common shape.
- Start hereHow to Toast Nuts Without Burning ThemHow to toast nuts: spread them on a rimmed pan and bake at 350°F for 5–10 minutes, stirring once, until golden and fragrant. Skillet, microwave and storage.
- Start hereHow to Mince Garlic Quickly, Plus How to Peel ItHow to mince garlic: smash the clove under a flat knife, peel it, trim the end, slice it thin, then rock the knife over it into ⅛-inch bits. Plus storage tips.
- Start hereHow to Prevent Freezer Burn and Keep Frozen Food Tasting FreshHow to prevent freezer burn: press out air, overwrap store packages, freeze food fast and keep the freezer at 0°F. Is freezer-burned food safe? USDA says yes.
- Free toolWhat can I make?Type what is in your fridge and get simple recipes you can cook right now.