Your Cool Home is supported by its readers. Please assume all links are affiliate links. If you purchase something from one of our links, we make a small commission from Amazon. Thank you!
Basil pesto lasts about 5 to 7 days in the refrigerator when stored properly.
If you’ve ever wondered how long does basil pesto last in the fridge or on the counter, the answer really depends on a few key factors like storage method and ingredients.
Homemade basil pesto lasts less time than store-bought versions because it lacks preservatives, so you’ll want to be extra careful with it.
In this post, we’ll break down exactly how long basil pesto lasts in different conditions, how to tell when it’s gone bad, and the best ways to extend its shelf life.
Let’s dig into the fresh, garlicky details.
How Long Does Basil Pesto Last in the Fridge?
The fridge is your best friend when it comes to pesto, and knowing how long basil pesto lasts there can save you from a sad, spoiled jar.
1. Homemade Basil Pesto Lasts 5 to 7 Days
When you make pesto at home with fresh basil, garlic, pine nuts, Parmesan, and olive oil, it’s at its peak freshness for about a week.
The high moisture content from the basil and cheese makes homemade basil pesto last only a short window before bacteria start to multiply.
To get the full 5 to 7 days, you need to store it in an airtight container with a thin layer of olive oil on top.
That oil barrier prevents oxygen from reaching the pesto, which is what causes it to oxidize and turn brown.
2. Store-Bought Basil Pesto Lasts 1 to 2 Weeks
If you’re wondering how long basil pesto lasts when it comes from a jar, the answer is a bit longer than homemade.
Store-bought basil pesto lasts about one to two weeks after opening because commercial versions often include citric acid or other preservatives.
These additives slow down spoilage, but they don’t stop it completely.
Always check the “use by” date on the jar, and once opened, treat it like any perishable sauce.
3. The “Oil Layer” Trick Extends Fridge Life
One of the biggest factors in how long basil pesto lasts is whether you’ve added that protective layer of oil.
Pour a generous splash of olive oil over the top of your pesto before sealing the container.
This simple step can add a couple of extra days to your pesto’s lifespan because it keeps air out.
Without the oil, homemade basil pesto lasts closer to 3 or 4 days before the top layer starts to darken.
How Long Does Basil Pesto Last in the Freezer?
Freezing is the ultimate hack for extending shelf life, and how long basil pesto lasts in the freezer is honestly impressive.
1. Frozen Basil Pesto Lasts Up to 6 Months
When you freeze basil pesto properly, it can last up to six months without a significant loss of flavor.
The key is to freeze it in small portions, like ice cube trays, so you can thaw only what you need.
This method means frozen basil pesto lasts through the winter and still tastes like summer.
2. Freezer Burn Is Your Only Enemy
To make frozen basil pesto last the full six months, you need to protect it from freezer burn.
Use airtight freezer-safe containers or wrap the ice cube tray in plastic wrap before freezing.
Once the cubes are solid, pop them out and store them in a zip-top bag with all the air squeezed out.
This prevents ice crystals from forming, which can ruin the texture and dull the bright basil flavor.
3. Thawing Doesn’t Shorten the Clock Much
After thawing, your pesto will only last about 2 to 3 days in the fridge, so plan to use it quickly.
The freezing process changes the structure slightly, so thawed pesto won’t last as long as fresh.
But for most people, a thawed cube gets used right away on pasta or sandwiches anyway.
How Long Does Basil Pesto Last at Room Temperature?
If you leave pesto out, the clock ticks much faster, and knowing how long basil pesto lasts on the counter is crucial for food safety.
1. No More Than 2 Hours
Basil pesto lasts only about 2 hours at room temperature before it enters the danger zone.
The USDA warns that perishable foods should not sit out for more than two hours because bacteria thrive between 40°F and 140°F.
Since pesto contains dairy from the cheese and moisture from the basil, it’s especially prone to spoilage.
If you’ve left it out for a dinner party, don’t push the limit, just put it back in the fridge.
2. The Two-Hour Rule Includes Serving Time
That two-hour window is cumulative, so if you take it out, put it back, and take it out again, the total time still counts.
This is especially important in warm weather or if you’re serving pesto outdoors.
When in doubt, throw it out, because homemade basil pesto lasts so little time outside the fridge that it’s not worth the risk.
How to Tell If Basil Pesto Has Gone Bad
Even if you track how long basil pesto lasts, sometimes it spoils faster than expected, and your senses are the best tool.
1. Dark Brown or Gray Color
Fresh basil pesto is a vibrant green, but as it oxidizes, it turns dark brown or even gray.
A little browning on the very top is normal if you didn’t use an oil layer, but if the whole batch is brown, it’s past its prime.
2. Sour or Fermented Smell
Pesto that has gone bad will smell sour, tangy, or slightly yeasty instead of fresh and garlicky.
If the aroma makes you wrinkle your nose, trust that instinct, the pesto has gone bad.
3. Slimy Texture or Visible Mold
Any sign of mold, whether fuzzy spots or a slimy film, means the pesto is done.
Mold can grow even in the fridge, especially if moisture got trapped under the oil layer.
If you see any of these signs, don’t taste-test it, just compost it and make a fresh batch.
So, How Long Does Basil Pesto Last?
Basil pesto lasts 5 to 7 days in the fridge if it’s homemade, and 1 to 2 weeks if it’s store-bought.
Frozen basil pesto lasts up to 6 months when stored in airtight portions, but only 2 hours at room temperature.
The best way to make basil pesto last as long as possible is to always keep an oil layer on top, store it in a sealed container, and freeze any extras right away.
So next time you whip up a batch, you’ll know exactly how long basil pesto lasts and how to enjoy every last spoonful.
Now go make some pasta and use that pesto while it’s fresh.