GuideHQ

Is it safe to make garlic or herbs in oil at home?

Why oil makes a low-acid food more dangerous rather than less, and the three ways to have flavoured oil without the risk.

Difficulty
beginner
Time
10 min
Read
4 min
Safety
restricted

Short answer

Fresh garlic or herbs sitting in oil at room temperature can grow Clostridium botulinum, because the oil removes oxygen and the ingredients are low-acid. Keep any home-made fresh-ingredient oil in the fridge and use it within three or four days, or freeze it. For a shelf-stable flavoured oil, use dried ingredients and a hot infusion that is then strained out completely.

This one catches people out because oil feels protective — it looks like a preserving medium and it has been used as one for centuries. What oil actually does is exclude air, and excluding air is precisely the condition botulinum needs. It is the single most common home-preserving hazard in an ordinary UK kitchen, and it comes from something that looks like a nice idea for a gift.

Safety

Garlic, herbs, chillies, mushrooms and sun-dried tomatoes stored in oil at room temperature are a recognised botulism hazard. Oil excludes oxygen, and these are low-acid foods that carry soil-borne botulinum spores. Home-made flavoured oils containing fresh ingredients must be kept in the fridge and used within a few days, or frozen — never stored in a cupboard, and never given as a gift to be kept on a shelf.

Step by step

  1. Understand the specific combination that is dangerous.Low-acid food, plus no oxygen, plus room temperature, plus time. Garlic, fresh herbs, chillies, mushrooms and home-dried tomatoes are all low-acid and all grow in or near soil, where botulinum spores live. Submerged in oil in a warm kitchen, that is a growth medium.
  2. Refrigerate any oil containing fresh ingredients, and set a short limit.Made today, used within three or four days, kept in the fridge the whole time. The cold slows growth substantially but does not stop it indefinitely, which is why the time limit matters as much as the fridge.
  3. Freeze it instead if you want it to keep.Garlic paste, herb oil and chilli oil all freeze well in ice cube trays. Frozen, they are safe indefinitely and you get exactly the convenience the jar was supposed to give you.
  4. Use dried ingredients for anything shelf-stable.Properly dried herbs, dried chillies and dried garlic have too little water for anything to grow. Warm the oil, infuse, and then strain the solids out completely so nothing is left sitting in the bottle. A bottle with a whole chilli or a sprig of rosemary standing in it looks better and is the version to avoid.
  5. Never leave commercial garlic-in-oil out after opening.Shop-bought jars of garlic in oil are acidified during manufacture, which is what makes them shelf-stable unopened. Once opened they go in the fridge, and the label will say so. Do not decant them into a nicer bottle for the worktop.
  6. Apply the same rule to the other airless foods.Vacuum-packing low-acid food removes oxygen for the same reason and gives the same risk. Vacuum-packed food is a fridge or freezer item on a short clock, not a cupboard item, whatever the packaging suggests.
  7. Throw out anything of uncertain age.A bottle of garlic oil that has been on the worktop for a month gives no sign of the problem — no smell, no cloudiness, nothing. Age and storage are the only information you have, so an unknown bottle goes in the bin unopened.

Tips

  • Confit garlic — garlic cooked slowly in oil — is delicious and is a fridge item with a week or so of life, not a preserve. Cooking does not destroy the spores.
  • The best-tasting garlic oil is made fresh in the pan a minute before you need it. There is very little to gain from keeping it.
  • If you want to give flavoured oil as a present, give a dried-herb infusion with the solids strained out, and write the date on it.
  • Home-dried tomatoes in oil are the same hazard as garlic in oil. Freeze them dry, or keep the jar in the fridge and eat it within a few days.

Common mistakes

  • Assuming the acidity of the herbs or the salt in the oil protects it — Neither is present in anything like the quantity that would matter. Making a preserve safe by acid means measured acidification to below pH 4.6 throughout, and a sprig of thyme does not do that.
  • Judging it by smell or appearance — Botulinum toxin produces no smell, no taste, no cloudiness and no gas that you would notice in oil. There is nothing to detect, which is exactly why the storage rule has to be followed rather than sense-checked.

Questions people ask

Can I acidify garlic myself to make it shelf-stable?

Not reliably at home. Commercial acidification is measured, verified and applied to a known quantity — it is not soaking garlic in vinegar for an hour. If you want acidified garlic, buy it, or pickle garlic properly in a full-strength vinegar to a tested recipe, which is a different product with a sharp taste.

How long can garlic oil sit out while I am cooking?

The risk is about days and weeks, not about the hour it spends on the worktop while you cook. Make it, use it, and put the remainder in the fridge with a date on it. The problem is the bottle that lives by the hob for a month.

Written and maintained by the GuideHQ editorial team. More in Food & Cooking.