Skip to main content

How Long Can You Refrigerate Fresh Pesto?

| ~6 min read | Pasta Sauces

Sections
  1. Why Pesto Has Such a Short Fridge Life
  2. The Role of Garlic and Oil
  3. How to Store Pesto So It Lasts
  4. Freezing Pesto for Longer Storage
  5. Signs That Pesto Has Gone Bad
  6. Pesto in Cooked Dishes and Leftovers
  7. Commercial Pesto vs. Homemade
  8. Frequently Asked Questions

Fresh pesto keeps in the refrigerator for about 3 to 5 days when it is stored in a tightly sealed container and kept at 40°F (4°C) or below. That window applies to homemade basil pesto made with fresh garlic, cheese, and nuts, and to opened jars of refrigerated commercial pesto, though a jar's own label may give a different figure. After that point the basil darkens, the garlic turns sharp and bitter, and the risk of spoilage grows, so it is best to use it up or freeze it within that range.

Why Pesto Has Such a Short Fridge Life

Pesto is not a high-acid sauce like tomato sauce, and it is not a pickled or fermented product. It is a raw, low-acid blend of fresh herbs, oil, nuts, and cheese, often with garlic. That combination is friendly to spoilage organisms and to the bacteria that cause foodborne illness, and it offers no protective acidity. The oil does not preserve the herbs; it simply coats them and slows oxidation slightly.

Two things drive the decline. First, basil oxidizes and darkens quickly once it is chopped and exposed to air, so the bright green turns olive-brown even while the pesto is still safe to eat. Second, the water content of the leaves and cheese creates a moist environment where microorganisms can multiply. Refrigeration slows this process but does not stop it, which is why the safe window is measured in days rather than weeks.

The Role of Garlic and Oil

Garlic is the ingredient most often misunderstood in pesto storage. Fresh garlic in oil is a known botulism risk when it is stored at room temperature, because the oil creates an oxygen-free environment where Clostridium botulinum spores can germinate. Pesto is not a garlic-in-oil infusion, since it contains plenty of other ingredients and is kept cold, but the principle still matters: never store pesto at room temperature for long periods, and never keep a jar of pesto in a warm cupboard once it has been opened or made fresh.

Refrigeration at 40°F (4°C) or below is the control that keeps this risk in check. If you make pesto in quantity and plan to keep it more than a few days, freezing is the safer route. Homemade pesto also should not be canned in a water bath; it is a low-acid product and does not fit the tested recipes for boiling-water canning.

How to Store Pesto So It Lasts

Handling makes a real difference to how close to five days you get. Work cleanly, use dry utensils, and keep the pesto cold from the moment it is made.

  • Seal it tightly. Press plastic wrap directly onto the surface of the pesto before putting the lid on, or use a small container that leaves little headspace. Air is what turns the top layer brown.
  • Add a thin oil film. A tablespoon of olive oil floated over the surface slows oxidation of the basil. This is a barrier, not a preservative, so it does not extend the safe window beyond a few days.
  • Keep it cold. Store on a shelf in the main body of the fridge, not in the door, where temperature swings are largest. Aim for 40°F (4°C) or below.
  • Use a clean spoon each time. Double-dipping introduces saliva and bacteria and shortens shelf life.
  • Refrigerate within 2 hours. If you made pesto at a warm kitchen counter, get it into the fridge promptly; above 90°F, cut that to 1 hour.

Freezing Pesto for Longer Storage

Freezing is the practical answer when you have more pesto than you can use in a few days. Pesto freezes well for about 3 to 4 months at 0°F (-18°C) without serious loss of quality, though the cheese may separate slightly and the color will dull. Spoon portions into ice cube trays, freeze, then transfer the cubes to a freezer bag. Thaw in the refrigerator overnight, or drop a frozen cube directly into hot pasta and stir; the heat finishes the thawing. If you plan to freeze pesto, some cooks leave out the cheese and stir it in after thawing, since cheese can turn grainy in the freezer.

Signs That Pesto Has Gone Bad

Color alone is not a reliable test, because pesto browns long before it spoils. Look and smell instead:

  • A sour, fermented, or distinctly off odor
  • Visible mold, including fuzzy patches or dark spots on the surface
  • Bubbling, fizzing, or a swollen lid on a jar
  • A slimy or tacky texture rather than a loose, oily one
  • A sharp, harsh garlic burn that was not there when fresh

If any of these are present, discard the pesto. Do not try to rescue it by scraping off the top layer, since mold filaments and bacteria can extend below the visible surface. When in doubt, throw it out.

Pesto in Cooked Dishes and Leftovers

Pesto is often stirred into hot pasta rather than eaten raw, and that changes the storage picture slightly. A pesto pasta dish is a cooked leftover and should be refrigerated within 2 hours and eaten within 3 to 4 days, reheated to 165°F (74°C). Note that reheating will dull the basil flavor, so it is often better to toss pesto with pasta just before serving and store the plain pasta and the pesto separately. Pesto used as a sandwich spread or stirred into salad dressing should follow the same 3-to-5-day rule as the jar itself.

If you are making pesto for a crowd and want to hold it out during a party, keep it on ice or in a chilled bowl and return it to the refrigerator within 2 hours, or 1 hour if the room is above 90°F.

Commercial Pesto vs. Homemade

Jarred pesto from the store is usually pasteurized or acidified, and its label will state how long it keeps after opening, often 1 to 2 weeks in the refrigerator. Follow the label over general guidance. Fresh refrigerated pesto sold in the deli case is closer to homemade and should be treated as a 3-to-5-day product once opened. Homemade pesto has no preservatives and no heat treatment, so it sits at the shorter end of the range and deserves the tighter handling described above.

Frequently Asked Questions

Can I keep pesto in the fridge for a week?

It is not recommended. Homemade pesto is best used within 3 to 5 days. Beyond that, quality drops sharply and the risk of spoilage increases, even if the pesto still looks green.

Does covering pesto with olive oil make it last longer?

An oil layer slows browning by limiting air contact, but it does not extend the safe refrigerated window much. It is not a preservative, and pesto stored under oil should still be refrigerated and used within about 5 days.

Can I freeze pesto in a glass jar?

Yes, but leave at least an inch of headspace, because pesto expands as it freezes and can crack a full jar. Plastic containers or ice cube trays are more forgiving.

Why did my pesto turn brown?

Basil oxidizes when exposed to air, and the cut surfaces darken. Browning is a quality issue rather than a safety one, but it usually means the pesto is past its best. Pressing plastic wrap onto the surface and adding a thin oil film helps slow it.

Is pesto safe for people with compromised immune systems?

Pesto contains raw garlic and uncooked cheese, and homemade versions are not heat-treated. People at higher risk of foodborne illness, pregnant women, young children, and older adults may prefer pasteurized or cooked pesto, or to use pesto in a hot dish where it reaches a safe temperature.

Can I leave pesto out on the counter?

No. Pesto should be refrigerated within 2 hours of making or opening, or 1 hour if the temperature is above 90°F. Leaving it out longer invites bacterial growth, particularly with raw garlic in oil.

Similar articles