Pesto-Infused Olive Oil: Easy Homemade Guide
| ~7 min read | Pasta Sauces
Sections
Yes, you can make pesto-infused olive oil easily at home, but there is an important catch: it must be made refrigerated and used quickly, or you must use a method that removes the food-safety risk. Pesto contains fresh basil, garlic and often cheese and nuts, and garlic and fresh herbs in oil at room temperature are a documented botulism risk. The safe version is a brief, gentle infusion in the fridge or freezer, used within a few days, or a method built on dried ingredients and acidified oil. Here is how it actually works.
What Pesto-Infused Olive Oil Actually Is
">
The phrase covers two quite different products, and confusing them is where most problems start.
- Infused oil: olive oil that has absorbed basil and garlic flavor, with the solids removed or mostly removed. It is used as a finishing oil, for dipping, or to drizzle over pasta.
- Oil-based pesto: a loose pesto where oil is the dominant liquid, with basil, garlic, nuts and cheese blended in. It is closer to a sauce than an oil.
Traditional pesto alla genovese is basil, garlic, pine nuts, Parmigiano-Reggiano or Pecorino, salt and olive oil. There is no vinegar and no heat, which is exactly why an oil-heavy version cannot sit on the shelf like a bottle of plain olive oil.
Why Fresh Basil and Garlic in Oil Are a Safety Issue
Garlic and fresh herbs are low-acid, moist ingredients. When they are submerged in oil, the oil seals out oxygen, and the anaerobic environment near the surface of the plant tissue can allow Clostridium botulinum spores to germinate and produce toxin if the mixture is held at room temperature. Commercial garlic-in-oil products are acidified or otherwise processed to prevent this. A home cook blending fresh garlic into oil and leaving it on the counter does not have that protection.
The practical rules that follow from this:
- Never store a fresh basil-and-garlic oil at room temperature, even for a day.
- Keep it refrigerated at 40°F (4°C) or below and use it within about 2 to 4 days.
- Freezing is the safe way to keep it longer; portion it in an ice cube tray and freeze at 0°F (-18°C).
- Never home-can or water-bath a pesto oil. Low-acid oil-and-herb mixtures are not a water-bath canning project.
- Discard any oil that smells off, looks cloudy in a way it did not before, or has bubbles or a bulging lid.
If you want a shelf-stable garlic oil, use dried garlic or commercially acidified garlic, or buy a commercially manufactured infused oil that states it is shelf stable. Do not improvise that at home.
Two Safe Methods, Step by Step
Method 1: Refrigerated cold-infusion (best flavor, short life)
- Wash and thoroughly dry about 1 packed cup (roughly 25 g) of fresh basil leaves. Any water left on the leaves shortens the oil's life and makes it cloudy.
- Combine in a blender or food processor with 1 cup (240 ml) of good extra-virgin olive oil, 1 to 2 peeled garlic cloves, a pinch of salt, and optionally 2 tablespoons of pine nuts or almonds.
- Blend to a loose, bright green oil. Add more oil if it is too thick to pour.
- Pour into a clean glass jar, cap it, and refrigerate immediately. Do not leave it out to "steep."
- Use within 2 to 4 days. For a clearer oil, let it settle in the fridge and pour off the top layer, leaving the sediment behind.
Method 2: Frozen cubes (best for keeping a batch)
- Make the oil as above, or blend a thicker pesto with 1/2 cup oil plus 1/4 cup grated hard cheese.
- Spoon into an ice cube tray, filling each well about 3/4 full.
- Freeze until solid, then transfer the cubes to a freezer bag, pressing out air.
- Use within 3 months. A cube is roughly 1 to 2 tablespoons of oil, handy for tossing through hot pasta, soup or roasted vegetables.
Neither method should involve cooking the basil. Heat turns basil dull and brown, and it also risks driving off the aromatics. If you want a warm oil, warm the oil gently, let it cool slightly, then blend — and still refrigerate it afterward. Do not seal hot oil into a jar and leave it out.
Choosing the Oil and the Basil
An everyday extra-virgin olive oil with a peppery, slightly bitter finish balances basil well. A very delicate oil disappears behind the garlic; a very aggressive one overwhelms the leaves. You do not need the most expensive bottle, but you do want one you would happily eat raw.
- Basil: sweet Genovese basil is the classic. Thai basil and purple basil give a different, anise-leaning result, which is fine but not "pesto" in the traditional sense.
- Garlic: 1 to 2 cloves per cup of oil is the usual range. Raw garlic gets sharper over time in oil, so err on the lower side.
- Nuts: pine nuts are traditional and expensive; almonds, walnuts, pistachios or sunflower seeds all work. Toasting them first adds depth.
- Cheese: Parmigiano-Reggiano for nuttiness, Pecorino for salt and bite. Cheese makes the mixture more perishable, so it belongs in a refrigerated or frozen product only.
- Acid: a small squeeze of lemon juice or a splash of vinegar is non-traditional but helps both flavor and stability. It does not make the oil safe to store at room temperature, however.
Common Problems and Fixes
- The oil turns muddy or cloudy: water on the leaves or blended-in solids. Dry the basil well, and strain through a fine mesh sieve if you want a clear oil.
- It tastes raw and harsh: too much garlic. Reduce the cloves, or use roasted garlic for a milder result.
- The color dulls or browns: oxidation and light. Store in a dark jar or an opaque container, in the fridge, full to the top to limit air.
- It separates: normal without emulsifiers — shake or stir before use.
- It becomes bitter: over-blending the leaves, or old nuts. Pulse rather than run the machine for minutes.
How to Use It
Drizzle it over pasta as a finishing oil rather than using it as the only sauce; a tablespoon or two over a hot bowl of spaghetti, gnocchi or soup is enough. Toss it with roasted potatoes, white beans or grilled vegetables, spoon it over fish, or use it as a dipping oil with bread. For a fast pesto for 12 oz (340 g) of pasta, blend the oil version with a little grated cheese and thin it with a few tablespoons of the starchy pasta water to help it coat. Buy or cook your pasta al dente — check the package time and start tasting a minute earlier — and reserve a cup of pasta water before draining.
Leftover oil or pesto should go back in the fridge immediately and be used within the same 2 to 4 day window. Refrigerate cooked leftovers within 2 hours (1 hour if the room is above 90°F/32°C).
Costs and Comparisons
Making it at home usually costs less than buying a jarred pesto or infused oil, mainly because you control the oil and skip packaging. Pesto with pine nuts is the priciest combination; swapping in almonds or sunflower seeds cuts the cost sharply. Store-bought infused oils are shelf stable because they are commercially processed, something home versions cannot claim — so if convenience and storage life matter more than freshness, buy a labeled shelf-stable product instead.
- Fresh pesto (with cheese, fridge): best flavor, 2 to 4 days.
- Oil-based pesto (frozen cubes): good flavor, up to 3 months.
- Commercial infused oil: convenient and shelf stable, but a different, flatter product.
Frequently Asked Questions
Can I store pesto-infused olive oil at room temperature?
No. Fresh basil and garlic in oil should be refrigerated and used within a few days, or frozen. Room-temperature storage of these fresh-ingredient oils is a botulism risk.
How long does it last in the fridge?
About 2 to 4 days. Keeping it in a small, full jar in the coldest part of the fridge helps, and freezing extends the life to roughly 3 months.
Can I water-bath can pesto oil?
No. It is a low-acid oil-and-herb mixture, and it is not safe to water-bath can. Freezing or refrigeration is the right approach at home.
Do I need a food processor?
It helps, but a mortar and pestle or a knife makes a coarser, more traditional result; a blender works if you pulse rather than run it continuously. A small food processor is the easiest for a cup of oil.
Why did my oil turn brown?
Oxidation, light exposure and over-blending. Dry the basil well, use a dark jar, keep it cold, and pulse in short bursts.
Is it safe to give to children?
In small amounts as a seasoning on their food, yes, but do not give honey to babies under 1, and remember raw garlic can be strong for young children.