Yes, both homemade and opened commercial pesto need refrigeration to slow spoilage and extend safe use. Unopened commercial jars can stay in a cool.
A fresh jar of pesto sits on the counter after a big pasta dinner. It feels sturdy — thick with oil and packed with basil. But that protective layer of oil is one of the main barriers between the pesto and rapid spoilage.
The honest answer is that both homemade and opened commercial pesto need the fridge. An unopened jar can stay in the pantry until opened, but once you break the seal, spoilage starts. How long varies considerably depending on the source — some say 3 days, others say up to 3 weeks — so knowing the variables helps you store it smarter.
Why Pesto Spoils Faster Than You Think
Pesto is a blend of fresh herbs, garlic, oil, cheese, and nuts. That specific mix creates a prime environment for bacteria and mold once the jar is opened and exposed to air.
Garlic and basil are naturally low-acid, and the cheese adds moisture and protein. While the oil layer acts as a physical barrier on top, every time you dip a fork or spoon into the jar, you introduce new microbes and oxygen.
Refrigeration slows that microbial growth considerably. Most food safety guidelines agree that refrigeration is the safest bet, even if the oil layer on top of a jarred pesto still looks intact. The cold temperature buys you several extra days of quality.
Why The Fridge Life Numbers Vary So Much
Searching for pesto shelf life online returns a wide range — 3 days, 7 days, even 3 weeks. That spread isn’t bad information; it’s a reflection of different pesto types and storage habits. The key factors that determine fridge life include:
- Freshness of ingredients: Homemade pesto from fresh basil has more natural moisture, which spoils faster than the pasteurized commercial product in jars.
- Acid and preservatives: Many commercial pesto brands add citric or lactic acid as preservatives, which significantly extends fridge life compared to homemade.
- Cheese and nut composition: Hard cheeses like Parmesan are more stable, but soft cheese or pine nuts can go rancid quickly, pulling the whole batch down.
- Oil layer coverage: A thick layer of olive oil on top seals out oxygen. If the seal is broken or the jar is half-empty, the pesto underneath spoils much faster.
- Cross-contamination: Using a clean, dry spoon each time prevents introducing bacteria from your mouth or other foods, which can shorten shelf life dramatically.
So when you see a range like 3 days versus 3 weeks, both numbers can be correct depending on the specific pesto sitting in your fridge right now.
Homemade Versus Commercial Storage Guidelines
Homemade pesto is the most fragile. Because it lacks commercial preservatives and pasteurization, the National Center for Home Food Preservation suggests using it within 3 days for peak safety. Many recipe blogs, including the detailed guide on homemade pesto fridge life, push that window to 5–7 days, assuming an airtight container and consistent refrigeration. The 3-day mark is the most conservative estimate; the 7-day mark is on the looser end.
Commercial pesto handles storage much better overall. An unopened jar can sit in a cool, dark pantry for about a year. Once opened, most sources say it keeps for 4 to 7 days in the fridge, though some users report good quality for up to 3 weeks if the pesto was handled cleanly and kept cold.
The type of pesto you have is the single biggest variable in how long it will last.
| Pesto Type | Pantry (Unopened) | Fridge (Opened) |
|---|---|---|
| Homemade (fresh basil) | Not recommended | 3 to 7 days |
| Homemade (frozen) | N/A | Up to 2 months (frozen) |
| Commercial (jar or tub) | About 1 year | 4 to 7 days |
| Commercial (refrigerated section) | Follow use-by date | Use within 7 days of opening |
| Dried pesto mix | Best-by date on package | N/A (dry storage) |
These ranges reflect common recommendations from food storage guides. Your specific jar may last more or less time depending on the freshness of the original ingredients and how carefully it was handled.
How To Tell If Your Pesto Has Gone Bad
Your senses are the best tools for deciding whether to toss that jar. Don’t rely solely on the printed date on the lid. Signs of spoilage include:
- Check for mold: Any fuzzy green, white, or black spots on the surface or around the rim mean it’s time to compost the batch.
- Smell it: Fresh pesto smells bright and herbal. A rancid, sour, or “off” odor means the oils have oxidized or bacteria have moved in.
- Look at the color: Some browning on the top layer is normal oxidation from air exposure. But if the entire jar has darkened or turned brown, it’s past its prime.
- Feel the texture: A little separation of oil is normal. But if the pesto looks slimy, watery, or has an unusual consistency, discard it.
When in doubt, remember the basic rule: pesto is a fresh product. If it looks, smells, or feels questionable, the safest move is to throw it away.
Freezing Pesto For Longer Storage
If you can’t finish a batch within the fridge window, freezing is an excellent option. Both homemade and commercial pesto freeze surprisingly well because the oil content helps protect the texture from ice crystal damage.
The best method is to spoon pesto into an ice cube tray, freeze until solid, then pop the cubes into a freezer bag. This gives you single-serving portions for quick pasta, soups, or marinades. You can also freeze it in a flattened freezer bag to save space.
According to the national center for home food guidelines cited by food storage experts, frozen pesto retains good quality for about 2 months. After that, the flavor may start to fade, though it remains safe to eat indefinitely if kept consistently frozen.
| Freezing Method | Best Quality Window |
|---|---|
| Ice cube tray (portions) | 2 months |
| Freezer bag (flattened) | 2 months |
| Freezer-safe jar with headspace | 1 to 2 months |
The Bottom Line
Pesto absolutely needs refrigeration once it’s been opened. Homemade batches are best used within 3 to 7 days, and opened commercial jars within about a week. Freeze any surplus within that window to avoid waste. When you’re not sure, trust your senses — mold, off smells, and texture changes are clear signals to toss it.
Whether you’re storing a big batch of basil pesto from the summer garden or a familiar jar from the grocery store, the same rule applies: keep it cold, keep it sealed, and trust your nose before using it on your next pasta night.
References & Sources
- Justisafourletterword. “Fresh Pesto” Homemade pesto should be stored in the refrigerator and consumed within 5-7 days for best quality.
- Urbanfarmie. “How Long Does Pesto Last” The National Center for Home Food Preservation suggests fresh pesto should be stored in the fridge for no more than 3 days.

Leave a Reply