The Feast

Home cooking recipes for everyday dinners and easy entertaining

Does Basil Pesto Need to Be Refrigerated?

· 5 min read · Dinners

Yes, basil pesto needs to be refrigerated if it contains fresh ingredients like garlic, cheese, or olive oil, especially after opening. Homemade or fresh store-bought pesto must be kept cold to prevent bacterial growth and spoilage.

Background and Composition of Basil Pesto

Basil pesto is a traditional Italian sauce originating from Genoa, made primarily from fresh basil leaves, garlic, pine nuts, Parmigiano-Reggiano or Pecorino cheese, and extra-virgin olive oil. The combination of these ingredients creates a rich, aromatic sauce commonly used with pasta, sandwiches, and vegetables. Because it contains perishable components—especially fresh garlic, cheese, and raw olive oil—it is inherently vulnerable to microbial growth when left at room temperature for extended periods.

The high moisture content in fresh basil and the presence of proteins and fats from cheese and nuts provide an ideal environment for bacteria such as Salmonella, Listeria, and Staphylococcus aureus to multiply. While olive oil forms a protective layer on top that can slow oxidation, it does not prevent bacterial contamination, particularly after the seal is broken or the pesto is stirred.

How Refrigeration Preserves Pesto

Refrigeration slows the growth of harmful bacteria and prevents the oxidation of delicate oils and herbs. The USDA recommends keeping perishable foods, including fresh sauces, at or below 40°F (4°C) to remain safe for consumption. Cold temperatures inhibit microbial activity and help maintain the bright green color and fresh flavor of basil.

Oxidation is another major factor. When basil pesto is exposed to air, the chlorophyll in the leaves breaks down, turning the sauce from vibrant green to a dull brown. Refrigeration, especially when combined with a thin layer of oil on the surface or storage in an airtight container, significantly slows this process.

Additionally, the cheese and garlic in pesto are both high-risk ingredients at room temperature. Garlic-in-oil mixtures, in particular, can support the growth of Clostridium botulinum—the bacterium responsible for botulism—under anaerobic (oxygen-free) conditions if stored improperly at room temperature.

How to Store Basil Pesto Properly

Proper storage is critical to maintaining both the safety and quality of basil pesto. Whether homemade or store-bought, follow these steps:

  1. Use a clean, airtight container: Glass jars with tight-fitting lids are ideal. Avoid containers with cracks or worn seals.
  2. Top with a layer of olive oil: After filling the container, pour a thin layer (about 1/8 inch) of olive oil over the surface to limit air exposure.
  3. Press plastic wrap directly on the surface (optional): Before sealing, place a piece of plastic wrap directly on the pesto to further reduce oxidation.
  4. Refrigerate immediately: Place the pesto in the coldest part of the refrigerator, typically the back of the middle shelf.
  5. Label with the date: This helps track freshness and ensures timely use.

Unopened commercial pesto in shelf-stable packaging (usually vacuum-sealed and pasteurized) may be stored in a cool, dark pantry until the expiration date. However, once opened, it must be refrigerated regardless of packaging.

Shelf Life and Signs of Spoilage

The shelf life of basil pesto depends on its preparation and storage:

  • Homemade pesto: 5–7 days in the refrigerator.
  • Opened commercial pesto: 7–10 days, depending on preservatives and storage conditions.
  • Unopened shelf-stable pesto: Up to several months in the pantry, as indicated by the manufacturer.
  • Homemade pesto frozen: Up to 6 months in airtight containers or ice cube trays.

Signs that pesto has spoiled include:

  • An off or sour smell
  • Mold growth (fuzzy spots of white, green, or black)
  • Change in texture (slimy or separation that doesn’t resolve with stirring)
  • Dark brown or black discoloration throughout, not just on the surface

If any of these signs appear, discard the pesto immediately. Do not taste to check—some harmful bacteria do not produce noticeable odors.

Common Problems and Misconceptions

One common misconception is that the olive oil in pesto acts as a preservative, making refrigeration unnecessary. While oil can slow oxidation, it does not kill bacteria. In fact, oil-rich, low-acid environments like pesto can promote the growth of Clostridium botulinum if stored at room temperature for more than 2 hours.

Another myth is that adding lemon juice or vinegar makes pesto shelf-stable. While acid can inhibit some bacteria, the amount typically used in pesto (a squeeze of lemon) does not raise the acidity enough to make it safe for room-temperature storage. True shelf-stable pesto requires commercial canning processes, including pH control and heat treatment, which are not replicable at home.

Some people believe freezing alters flavor too much, but when done correctly—using ice cube trays and airtight packaging—frozen pesto retains most of its quality and is a safe, long-term storage solution.

Alternatives and Shelf-Stable Options

For those seeking longer shelf life without refrigeration, consider:

  • Dried pesto paste or powder: Commercially available dehydrated versions can be stored in the pantry and reconstituted with oil or water.
  • Oil-free pesto: Made with yogurt or beans instead of oil and cheese, though these still require refrigeration after preparation.
  • Vegan pesto without cheese: While this removes dairy risk, the garlic and oil still require refrigeration after opening.

Always read labels: some store-bought pesto brands use preservatives like potassium sorbate or citric acid and are pasteurized, allowing unopened jars to be shelf-stable. However, these must still be refrigerated after opening.

Frequently Asked Questions

Can I leave basil pesto out overnight?

No. Perishable foods, including pesto, should not be left at room temperature for more than 2 hours (1 hour if the ambient temperature is above 90°F). After this time, bacteria can multiply to unsafe levels, increasing the risk of foodborne illness.

Does jarred pesto go bad in the fridge?

Yes. Even refrigerated jarred pesto will eventually spoil. Once opened, most last 7–10 days. Always check the “use by” date and look for signs of spoilage like mold, off odors, or texture changes.

Can I freeze basil pesto?

Yes. Freezing is an excellent way to preserve homemade pesto. Pour it into ice cube trays, freeze, then transfer to airtight freezer bags. Use within 6 months for best quality. Thaw in the refrigerator before use.

Why does my pesto turn brown?

Browning is caused by oxidation when basil is exposed to air. It’s generally safe to eat if refrigerated and within the shelf life, but flavor and appearance degrade. Prevent it by storing with an oil layer or plastic wrap directly on the surface.

Is it safe to can homemade pesto?

No. Homemade pesto should not be canned using a water bath or pressure canner unless following a scientifically tested recipe from a reliable source like the National Center for Home Food Preservation. Most pesto recipes are low-acid and oil-based, creating a high risk for botulism if improperly canned.

Can I make pesto without cheese to extend shelf life?

Removing cheese reduces one perishable ingredient, but pesto with garlic and oil still requires refrigeration. The risk of bacterial growth in oil-based mixtures remains, so refrigeration is still necessary.

In this article
  1. Background and Composition of Basil Pesto
  2. How Refrigeration Preserves Pesto
  3. How to Store Basil Pesto Properly
  4. Shelf Life and Signs of Spoilage
  5. Common Problems and Misconceptions
  6. Alternatives and Shelf-Stable Options
  7. Frequently Asked Questions