Pesto, that vibrant, aromatic Italian sauce made from basil, garlic, pine nuts, Parmesan, and olive oil, is one of those culinary delights that can elevate so many dishes, from pasta to sandwiches to even pizza. It’s packed with flavor and offers an herbaceous burst that is hard to resist. But like all foods, pesto does have a shelf life, and if you’re not careful, it can go bad. This raises an important question: Can pesto go bad? The short answer is yes. However, the conditions under which it spoils and how to preserve it for as long as possible are worth diving into.
Let’s talk through this in more detail, breaking it down step-by-step to help you understand how to extend the life of your pesto and avoid the unpleasant experience of discovering that your jar of pesto has turned on you.
Can Pesto Go Bad?
Pesto does go bad, despite its hearty ingredients. The combination of fresh herbs, oils, nuts, and cheese makes pesto a perishable product, especially once it’s been opened or made fresh at home. Here’s why pesto is susceptible to spoiling:
- Fresh Ingredients: Ingredients like basil and garlic are perishable. When left in an open jar, they lose their freshness over time.
- Oil: While oil acts as a preservative, it can go rancid. The olive oil in pesto will begin to degrade over time if exposed to heat, light, or air.
- Nuts: Pine nuts and other nuts in pesto are high in fat, making them prone to oxidation, which leads to spoilage and an unpleasant taste.
- Cheese: The Parmesan or Romano used in pesto adds flavor but can also be a breeding ground for bacteria when left unrefrigerated for too long.
It’s important to store pesto properly and consume it within a reasonable time frame to ensure you’re getting the freshest taste and safest experience.
Shelf Life For Pesto

The shelf life of pesto depends on whether you’ve bought it from a store or made it yourself.
-
Store-bought Pesto
- Unopened: If stored properly, it can last between 6 months to a year in the pantry. Always check the expiration date on the jar for more specific guidance.
- Opened: Once you break the seal, store-bought pesto usually lasts around 1 to 2 weeks in the fridge, though it can last up to 3 weeks if the jar is tightly sealed and refrigerated immediately after use.
-
Homemade Pesto
- Homemade pesto is a little more tricky because it lacks preservatives. Typically, it will stay fresh in the fridge for about 5 to 7 days.
- Freezing: If you want to extend the life of homemade pesto, consider freezing it. Frozen pesto can last for 3 to 6 months in an airtight container or ice cube tray, which allows for convenient single servings later.
Common Signs Of Spoilage
You don’t always need to guess whether pesto has gone bad. There are a few common signs you can look for, so you don’t risk eating something spoiled.
- Off smell: Fresh pesto has a strong, herbaceous scent, with the aroma of basil and garlic. If it smells sour, rancid, or off in any way, it’s a clear sign that it’s no longer good.
- Color change: Pesto naturally darkens over time. However, if the pesto turns a dull brown or develops a blackened hue, it’s a sign of oxidation, and the pesto should be discarded.
- Mold: If you see mold growing on the surface, it’s a definite indication that the pesto has gone bad. Mold is typically green or white, and it’s a sign that bacteria have taken hold.
- Separation: While it’s normal for oil to separate in pesto over time, an excessive amount of oil separation or a strange consistency could indicate spoilage.
- Off taste: If the pesto tastes overly bitter, sour, or rancid, it’s best not to continue consuming it.
How To Store Pesto?

Proper storage is key to preserving your pesto for as long as possible. Whether you’re dealing with store-bought or homemade pesto, here are some best practices for storage:
-
Refrigeration
- Store pesto in an airtight container, preferably glass, to minimize exposure to air. Air can speed up the oxidation process.
- To help prevent browning, consider adding a thin layer of olive oil on top of the pesto before sealing it in the container.
- Keep the pesto as cold as possible. Your fridge should be set at or below 40°F (4°C) to keep it from spoiling too quickly.
-
Freezing Pesto
- If you’ve made more pesto than you can use within a week or two, freezing is an excellent option.
- Freeze pesto in an ice cube tray so you can easily grab a small portion for later. Once the cubes are frozen, transfer them to a resealable plastic bag or airtight container for long-term storage.
- If you prefer, you can also freeze pesto in small jars or containers, but make sure to leave some room for expansion as the pesto freezes.
-
Avoid Room Temperature Storage
- Never store pesto at room temperature, especially after it’s been opened. Bacteria can grow rapidly at room temperature, which can lead to foodborne illness or spoilage.
Expert Tips
If you want to ensure your pesto lasts as long as possible and maintains that fresh, vibrant flavor, consider these tips:
- Cover with Oil: When storing pesto, always drizzle a thin layer of olive oil on top of the sauce before sealing the container. This helps prevent oxidation, which keeps the pesto from turning brown.
- Freeze in Portions: If you tend to use pesto in small amounts, freeze it in individual servings using an ice cube tray. This makes it easier to thaw just what you need, while the rest stays fresh.
- Use Fresh Ingredients: The fresher the ingredients, the longer your pesto will last. When making pesto from scratch, use the best basil, garlic, and nuts you can find. Fresh herbs hold up better to refrigeration and freezing.
- Consider Adding Lemon: Some people add a little bit of lemon juice to their pesto, which helps maintain its color and freshness. The acid can also act as a natural preservative.
FAQs
How Long Can Pesto Last In The Fridge?
Pesto can typically last for about 5 to 7 days in the refrigerator when stored properly in an airtight container. To maximize its shelf life, ensure the pesto is kept in a tightly sealed container, and cover the surface with a layer of olive oil to prevent oxidation.
How Can I Tell If Pesto Has Gone Bad?
Signs that pesto has gone bad include an off or sour smell, mold growth on the surface, and a change in color (from vibrant green to brownish or yellowish). If the texture becomes watery or slimy, this is also an indication that it’s no longer safe to eat.
Can Pesto Be Stored In The Freezer?
Yes, pesto can be stored in the freezer for up to 3-6 months. To freeze pesto, place it in an airtight container or ice cube trays for easy portioning. Just be sure to leave a small amount of space for expansion when freezing.
Does Pesto Need To Be Refrigerated?
Yes, pesto should be refrigerated after opening or after preparation to maintain freshness and prevent bacterial growth. If left out at room temperature for more than two hours, pesto can spoil and should be discarded.
What Is The Best Way To Preserve Pesto?
To preserve pesto, store it in an airtight container in the refrigerator and cover the surface with a thin layer of olive oil to prevent exposure to air. For longer storage, freezing pesto in portion-sized cubes is highly effective.
Can Pesto Go Bad After A Week?
Yes, pesto can go bad after about a week in the refrigerator. The oil in pesto can start to oxidize and the herbs may begin to degrade, affecting the flavor and safety. Always check for signs of spoilage before use.
How Should I Store Homemade Pesto To Make It Last Longer?
For homemade pesto, store it in an airtight container with a layer of olive oil on top to prevent it from turning brown. You can also freeze homemade pesto for longer shelf life. Be sure to keep it in the fridge if using it within a week.
Can I Eat Pesto If It Has Turned Brown?
While a slight browning on the surface of pesto is natural due to oxidation, if the entire pesto has turned brown and has an off taste or smell, it is likely spoiled and should not be eaten.
Does Pesto Go Bad Faster If It Contains Cheese?
Yes, pesto that contains cheese (such as Parmesan) will spoil faster than dairy-free versions due to the perishable nature of cheese. It’s best to consume pesto with cheese within 3 to 5 days when stored in the refrigerator.
Can I Use Pesto Past Its Expiration Date?
Using pesto past its expiration date is not recommended, as the ingredients may have begun to degrade, leading to potential spoilage. Always check for signs of spoilage, like unusual smell, texture, or color, before consuming.