We are reader-supported. When you buy through links on our site, we may earn a commission. Learn more about our review process.

Nerdy Science in the Kitchen

How Long Does Pesto Last in the Fridge? 



When you’ve got a craving for Italian, sometimes nothing but pesto will do. This salty, rich, and green sauce goes well on pasta, veggies, breads, and more, but what kind of shelf life can you expect from this Genoa favorite? How long does pesto last in the fridge?

Pesto comes in 3 varieties – store-variety unrefrigerated jarred and shelved, jarred and refrigerated, and homemade. Unopened, your unrefrigerated jar of pesto sauce will last 1 to 3 months or 7 to 14 days once opened.

Refrigerated commercial jarred pesto is best used within 5 to 7 days and will last another 4 to 7 days once opened. Homemade pesto has the shortest shelf-life, at around 3 to 4 days in your refrigerator. We’ll cover freezing and other options later in this article, but that’s the basic shelf life in your fridge!

Thankfully, there are certain tricks for stretching the mileage of your favorite pesto, and today we’ll take a closer look at why pesto goes bad, what kind of storage tweaks you can use to prevent that, and how to tell when it’s time to put that pesto in the bin and replace it.

How long does pesto last in the fridge? Let’s take a deep dive into the factors so you’ll have the definitive answer!

Pesto – What’s in it that shortens the shelf life

A jar of open pesto with pine nuts around it
A jar of open pesto with pine nut around it.

To better understand why your pesto goes bad in the first place, we should take a look at the ingredients. Here’s what’s in your basic pesto, per a great recipe we found from Anderval at Allrecipes:

  • Basil
  • Parmesan Cheese
  • Olive oil
  • Pine Nuts
  • Garlic
  • Lemon juice

Seeing the ingredients laid out, we’ve got fresh herbs, dairy, garlic, and nuts, along with some citric acid from your lemon juice, all contained in an oil. The parmesan cheese is actually hardy for dairy, as an opened block will last for 1 to 3 months in your fridge, but fresh garlic lasts about a week when it’s peeled.

Fresh basil lasts about 2 weeks on its own in your fridge and the pine nuts, while they can go rancid, will normally last 3 to 6 months in the fridge. If we factor in the lemon juice and its high acidity, that definitely lowers the shelf life of the other ingredients, but it also helps to keep some microorganisms out and the oil cover holding everything together will definitely help by reducing exposure to the air.

That’s why you’ll see warnings on the jar of some pesto that tell you to ‘top it off’ with fresh olive oil after opening (and some even recommend a teaspoon of lemon juice to keep it from browning) – it helps to extend the shelf life by keeping those perishable ingredients from getting direct contact with the air. The oily sauce is still vulnerable, of course, but it does have some defense against the elements and that’s part of what gives it that impressive pantry life (aside from commercial additives and preservatives, of course!).

Storing your pesto and what to expect

Homemade pesto in a glass jar on a wooden board
Homemade pesto in a glass jar on a wooden board.

As store-bought pesto will have the added perks or preservatives and a handy use-by date to help you, we’re going to move our focus onto preserving homemade pesto the longest with the most common methods available – refrigeration, freezing, and vacuum-sealing. Let’s take a look at each and we’ll give you some tips along the way that can help you to stretch out your pesto’s shelf-life!


Starting off, when you’ve made your pesto, storing it the right way is going to be key to getting the longest life, and tall, narrow jars are usually the best way to go. That’s because you can fill them ¾ of the way with your homemade pesto, then add enough oil to cover the last ¼ of space in the jar, and since it’s skinny that won’t affect the overall flavor much at all.

With a wider jar, it would take more oil, so stick to tall, skinny jars and you have the best refrigeration storage method without affecting the flavor.

Beyond this, just make sure to open and reseal your jar quickly, pouring out what you need and then getting it back to the refrigerator. If you’re careful, it might well be good for up to 5 – 7 days (instead of the standard 3 to 4) with the extra oil helping to protect the top and the care you’re taking to reduce exposure to the air.

That said, it’s not the most ideal solution – you still don’t get a lot of time to eat your pesto – so let’s look at what freezing and vacuum sealing can do.


Freezing your pesto will give you a definite upgrade on storage time, as you could conceivably store it for 6 to 8 months – although it’s really best to eat it within 3- 4 months’ time as the flavor will degrade after that.

As far as storage methods, while you could go with a large, plastic container, it’s really better to mete out individual servings and store them in Ziploc bags. You can even double-wrap with foil to help keep freezer burn at bay and by storing it in easy-to-use, single-serve servings you can pull out what you need instead of having to pull out the entire batch.

In case you’re curious, frozen store-bought pesto will usually last 3-4 months after you’ve opened it and still taste great, so freezing pesto puts it on par with store-bought as far as preservation by freezing is concerned.

Vacuum sealing

Vacuum sealing will get you the longest shelf-life for your homemade pesto, as it will still stay yummy for 6 to 8 months in your freezer, as opposed to the standard 3 to 4. The trick to it is to freeze your pesto in advance and then vacuum seal it, which will draw all of the oxygen out of the bag so that you’ll have a neat, stackable pesto serving that you can mark with the date and store away in your freezer.

If you don’t already have a vacuum sealer, they are definitely recommended and models like this Bonsenkitchen Dry/Moist vacuum sealer will set you back a little more than a large pepperoni pizza price-wise and they’re well worth it. Aside from getting more mileage out of your pesto, you can vacuum seal fresh fruits and veggies for lunch, meats, and all kinds of other things. Hands down, they’re one of the best ways to preserve most of your foodstuffs!

How do I thaw out frozen pesto?

Fresh pesto in a small bowl
Fresh pesto in a small bowl.

When you want to use some of your frozen pesto, in some cases you can just add it frozen to your recipe and it will be fine, but if you won’t be heating it to make your current target dish, then you’ll want to thaw it out with a small saucepan.

Just use a low heat and stir occasionally until it’s thawed and if you want to ‘green it up’ a bit, you can add some freshly chopped basil to good effect and it will taste amazing. Provided that it hasn’t been in the freezer for too long, it should taste pretty close to the way that it did going in there, but be sure to check your pesto before serving – it may need an infusion of more fresh ingredients if it’s had a hard time in the freezer, although usually, it should be fine!

How can I tell if pesto has gone bad?

Someone spreading pesto on a piece of bread
Someone spreading pesto on a piece of bread.

Figuring out if your pesto has gone bad is fairly straightforward. That’s because when pesto goes bad, it usually becomes quite rancid and you’ll smell and see it pretty much right away. Below are the most common things to look for that can help you to confirm if your pesto has become unsafe:

  • Color – Fresh pesto is a lovely, bright green, courtesy of the fresh basil inside it and an enzyme called polyphenol oxidase that activates when you chop or otherwise prepare the herb. Over time, that enzyme causes a reaction in monophenol compounds in those leaves as they oxidize, which causes your pesto to darken. Simply put, if it’s starting to look brown or black, then the basil’s bad and you need to get rid of the pesto.
  • Smell – Pesto has a wonderful smell… until it doesn’t! If your pesto has started smelling off, especially if it’s earthy or slightly rancid-smelling, then it’s time to toss it out!
  • Taste – Pesto that has gone bad will usually start turning bitter, but if the taste seems weird to you at all, then don’t eat it – listen to what your taste buds are telling you!
  • Molding – Look for mold spots, especially around parmesan bits, and if you find any, then be sure to throw away your pesto. Even if it only seems to be affecting one cheese chunk, the odds are you’ll be eating pesto with bonus spores that you really shouldn’t be ingesting!


It’s just about time for us to call it a day, but before we do we have some frequently asked questions about pesto and its perishability. Let’s take a look and then we’ll get to wrap things up for today!

Can you get food poisoning from bad pesto?

Yes, you can get food poisoning from bad pesto, and in 2013 over 50 folks who ate a bad batch of pesto were exposed to Clostridium botulinum!

Symptoms for this can include things like blurred vision, diarrhea, and difficulty in swallowing. So, if you think that your pesto might be off then throw it away immediately – it’s not worth the risk of food poisoning!

Why did my pesto get moldy?

Usually, the first thing that goes bad in your pesto is the olive oil. Coupled with the oils from the pine nuts, along with the citrus and other ingredients, you’ve basically got a damp place full of organics that mold simply loves.

Always give your pesto a whiff to check for this – if it smells earthy, then throw it away.

Does cooking pesto ruin it?

Cooking pesto can ruin some of the more delicate flavors that come with it, so the only time that you should apply heat should be when you are thawing a batch, and even in that case keep it mild.

A very low heat is ideal and if you have a small pot, simply put water in a larger pot and start heating it with the smaller pot inside. This will help you to gradually warm it and save as much of the flavor as you can, although we should note that at a very low heat, you’ll probably be safe if you don’t overdo it!

Can you salvage pesto that has gone brown?

No, once your pesto is darkening, you’re basically dealing with decaying basil. It makes the sauce super-bitter and also unsafe, so if your pesto goes brown or black then it’s time to replace it.

If you absolutely LOVE pesto, then you might enjoy this little video from Acre Homestead, which will show you how to create a 1 year supply that you can store and tap as needed. It’s a lovely little video and well worth a peek if you’re curious about stocking up on your favorite sauce!

Some closing words on pesto in the fridge

Today we’ve answered the question ‘how long does pesto last in the fridge?’ as far as simple refrigeration, commercial pesto will usually last 5 to 7 days, while the homemade variety will last 3 to 4. Keep in mind that you can give this a little bump by storing it in thinner jars so that you can top it off with some extra olive oil, or you could simply freeze individual portions so that you can get some pesto as needed for the next 3 to 4 months.

Finally, if you want your homemade pesto to last as long as store-bought, then freezing and vacuum sealing it will give you the longest shelf life that you can get – a solid 6 to 8 months. Provided that you plan out your preservation strategy then you should be able to stretch your enjoyment of the pesto for a wee bit longer but be careful – if anything smells or looks off, even in the slightest, then it’s best to throw it out.

We’d like to thank you for reading and we sure hope to see you again soon!

Kitchen Professor author
About the Author: David McLemore

David learned to cook at an early age after his mother told him that he couldn't live on pizza forever, Dave uses his modest kitchen skills to recreate sorely-missed recipes from home and to occasionally make new favorite ones from places he is visiting.

Leave a Comment