How Long Does Pesto Last?
Opened pesto, whether from a jar or a refrigerated tub, lasts 5–7 days in the fridge, and homemade pesto 3–5 days. Pesto freezes well for 4–6 months. Never store it at room temperature once made or opened.
Pesto — opened
shelf life- Homemade: 3–5 days in the fridge
- Unopened: 1 year in the pantry
Fridge at 40°F (4°C) or below · freezer at 0°F (−18°C). Freezer times are for best quality; frozen food stays safe longer.
Pesto is an uncooked sauce of fresh basil, garlic, pine nuts, hard cheese and olive oil. It is low in acid and full of fresh ingredients, so it is truly perishable, and fresh garlic and herbs held under oil are a recognized botulism concern if kept warm. Basil also oxidizes quickly, which is why the surface turns dark.
How to store pesto
- Smooth the top and pour a thin layer of olive oil over it, or press plastic wrap onto the surface, to slow the browning caused by air.
- Keep pesto refrigerated at all times. Garlic and basil under oil at room temperature create the low-oxygen, low-acid conditions botulism bacteria need.
- Freeze pesto in ice cube trays, then transfer the cubes to a freezer bag; one cube is about right for a serving of pasta.
- For the best texture after thawing, freeze homemade pesto without the cheese and stir in freshly grated Parmesan afterward.
- Scoop with a clean spoon each time, and never return pesto that has touched hot pasta to the jar.
How to tell if pesto has gone bad
- Fuzzy white, gray or blue-green mold anywhere on the pesto or the jar walls.
- A rancid, crayon-like or paint-like smell from oxidized oil and pine nuts, or a sour, fermented odor.
- Browning that runs all the way through with a bitter, off taste. A dark top layer with bright green underneath is only oxidation.
- Bubbles, fizzing or a lid that has domed on a jar or tub.
Bacteria that cause food poisoning usually do not change the look, smell or taste of food. Go by the time limits first, and the signs above second.
Pesto shelf life chart
| State | Fridge | Freezer | Pantry |
|---|---|---|---|
| Opened | 5–7 days | 4–6 months | Not safe |
| Jarred or refrigerated store-bought pesto. Follow the label if it gives a shorter time, as some say 3–5 days. | |||
| Homemade | 3–5 days | 4–6 months | Not safe |
| No preservatives or added acid, so it has the shortest life. Freeze what you will not use within a few days. | |||
| Unopened | Not recommended | Not recommended | 1 year |
| Shelf-stable jars only. Refrigerated tubs must stay in the fridge and be used by their date. | |||
Not safe = perishable: no more than 2 hours at room temperature (1 hour above 90°F / 32°C). Not recommended = possible, but quality suffers or it serves no purpose.
Frequently asked questions
How long does pesto last in the fridge after opening?
Opened store-bought pesto lasts 5–7 days in the fridge, and homemade pesto 3–5 days. Go by the label if it states a shorter period. Keep the surface covered with a film of oil and use a clean spoon, and freeze what you will not finish in time.
Why did my pesto turn brown?
Pesto turns brown or dark green on top because cut basil oxidizes when exposed to air, much like a sliced apple. If the pesto underneath is still bright and it smells fresh, the discoloration is harmless and can be stirred in. Browning throughout, along with sour or rancid odors, means it is spoiled.
Can you freeze pesto?
Yes, pesto freezes very well and keeps best quality for 4–6 months. Portion it into ice cube trays or small jars with a thin layer of oil on top. Thaw it in the fridge or drop frozen cubes directly into hot pasta or soup. Do not thaw it on the counter.
Is homemade pesto a botulism risk?
It can be if it is stored at room temperature. Fresh garlic and herbs can carry botulism spores, and oil creates the oxygen-free environment they need. Refrigerate homemade pesto immediately, use it within 3–5 days or freeze it, and never try to can it at home in a water bath.
Related foods
| Food | Fridge | Freezer | Pantry |
|---|---|---|---|
| Fresh Basil Fresh |
3–5 days | 4–6 months | 7–10 days |
| Pine Nuts Opened |
3–6 months | 6–9 months | 1–2 months |
| Parmesan Opened |
3–4 weeks | 6 months | Not recommended |
| Olive Oil Opened |
Not recommended | Not recommended | 3–6 months |
| Pasta Sauce Opened |
4–5 days | 3 months | Not safe |
| Cooked Pasta Cooked |
3–5 days | 1–2 months | Not safe |
More sauces: BBQ Sauce, Fish Sauce, Hot Sauce, Oyster Sauce, Salsa, Soy Sauce.
Reviewed 2026-09-20. Times follow published USDA FoodKeeper / FSIS, FDA and CDC storage guidance; where sources differ we use the shorter time. How we compile this data.