Our community answers question on food safety as defined by official regulations. Questions and answers that contradict that view, are considered off-topic.
The food safety branch of food science is about mitigating or eliminating the risk of food-related illness, specifically illness caused by foodborne pathogens ("food poisoning") including bacteria and mold (fungi).
Rancidity and decomposition are other types of food spoilage which are not necessarily caused by pathogens but often discussed within this tag.
Dietary needs are not a component of food safety. If you have concerns about the overall "healthiness" of a food or technique, please consult with your doctor or dietitian; we are not qualified to provide nutritional advice.
Common misconceptions about food safety
Most people have not studied food safety, but apply a mixture of "common sense advice" they have come across over the years. Sadly, a lot of this advice is either irrelevant or wrong. If you believe these common myths, you might misunderstand the rules of food safety, so it is advisable to check them first.
- How safe a food is is about the actual number of pathogens in the food
This is what people want from food safety, but it cannot deliver that. Predicting the growth of bacteria in a given portion of food is so complex as to be impossible for all practical purposes, no matter how much initial information you can provide.
Instead, think of food safety as a kind of "certification system". Specialists have used traditional knowledge, scientific models and experimentation to determine a small set of known conditions under which they can guarantee you that your food is basically pathogen-free. If you can prove that the food meets the criteria they set up, they promise you it is safe to eat.
- Unsafe food is food which will make you sick
No, see misconception number one. Unsafe food is anything that does not meet the criteria for being safe. In most cases, it won't make you sick - it is just that the specialists are not willing to promise you that.
- These official rules are useless, my food is unsafe under them - but please help me make an estimate to how close it is to being safe.
Sadly, that's impossible. From two situations, it is quite easy to find out which one is safer than the other (e.g. leaving out meat for two nights is worse than leaving it out for one night) but there is no way at all to say whether the safer of the two is below the threshold for making you sick. People try to make such approximations all the time, but they are useless, since with bacterial growth, tiny differences in the initial conditions may have a huge effect on the result. (You may have heard of that as the "butterfly effect"). The idea is very attractive, but it doesn't work.
- But I know that I can tell if food is safe or not by smell, that's how I've always done it and I have never gotten sick
This may satisfy your subjective case of feeling safe when eating the food. It is contrary to the way food safety is officially regulated (see point 1), not getting sick doesn't mean it was actually safe, it means you were lucky (see point 2) and while smell can help you to recognize food that is exceedingly full of bacteria, it cannot help you recognize food which already has enough bacteria to make you sick, but not yet enough to smell. So smell is not a reliable way of judging food safety (see point 3).
- The details of the situation matter
No they don't. Since we cannot estimate the actual risk (see the misconceptions above), only a tiny bit of information is enough to know whether your food falls under the strict conditions of being safe, or if it doesn't. Once you know that, no further conclusions can be drawn, no matter how much detail you provide. That's why the rules are so generic.
- The usable time for a dish is the same as the usable lifetime of its ingredients (or its most perishable ingredient)
No, bacteria care about their environment as a whole and not about what parts of it looked like before being combined. If they have everything they need to grow, they will grow. Since particular foods are made shelf stable by removing something that bacteria need for growth, the combination of shelf-stable foods might well turn out to be perishable. The other direction is also possible - food made with eggs has the same storage lifetime as food without eggs, for example.
- Unsafe food can be turned into safe food
There are different ways people propose to do that, usually through heating. This is however not possible. Once food is considered unsafe, there is no way to get it back into the safe category (and being able to sterilize it doesn't change anything about that, since food safety is not about actual bacterial numbers, see misconception 1).
Fundamental rules of food safety
The top 5 things you need to know about food safety are:
When in doubt, throw it out. You cannot see or smell bacterial contamination. Mold that appears to be growing only on the surface may grow invisible roots into softer foods. Do not rely on a visual inspection or "smell test" to tell you whether or not a food is safe.
Raw or perishable food that stays in the temperature "danger zone" for more than 2 hours should be discarded. The danger zone is 40-140° F or 4-60° C. Keep cooked food hot until ready to eat, then refrigerate immediately. Separating large items into smaller containers will help them to cool more quickly.
Follow the cooking time and temperature guidelines set out by your local regulatory agency. For Americans this is the FDA and USDA. Before you ask a food safety question, please check the USDA Fact Sheet to see if your question is answered there. Failure to follow these guidelines (or your local regulatory equivalent) is irresponsible if you are serving guests and likely to be illegal if you are serving customers, as many local health codes are based on the FDA Model Food Code. You have the right to take risks on yourself, but please do not risk the safety of others and please do not ask us for an excuse to do so.
Bacteria leave behind harmful protein toxins that cannot be "killed" (denatured) by cooking. The cooking times/temperatures are only effective against live organisms, not their toxic waste products. Spoiled food cannot be cooked back to safety and must be discarded.
Cooking is pasteurization, not sterilization. Pasteurization means killing most microbes, so as to render the food safe for human consumption. This resets the clock but does not stop it; cooked food can and will still spoil after 2 hours in the danger zone. Sterilization methods (e.g. high-pressure canning and irradiation) are the only safe methods for longer-term room-temperature storage.
- Always cook food to the recommended time and temperature.
- Avoid cross-contamination by using separate utensils and cooking/storage vessels for raw vs. cooked food.
- Wash your hands and sanitize your work areas after handling raw foods.
- Defrost frozen foods in the fridge or under cold running water.
- Use a thermometer, appearance/colour is not a reliable indicator of doneness.
- If you suspect spoilage or contamination, please, throw it out.
The most asked question: I left this out... is it still safe?
See rule number 2 above: The general guideline for perishable foods is that you want them to be in the danger zone (40-140°F, 4-60°C) for no more than 2 hours (1 hour on a hot day).
If you can ensure uninterrupted heating above 60 Celsius, the life time is not limited food-safety-wise, but there are practical limits due to reduced palatability. For storage time at temperatures below the "danger zone", see databases of standard storage times, for example Still Tasty.
The time in the danger zone is cumulative. So it includes time bringing the food home from the grocery store, time before cooking, time after cooking, and so on. The reason is that while cooking may destroy bacteria or other pathogens, it doesn't always destroy the toxins that they have produced.
So in general, regarding perishable foods like meat, dairy, eggs, cooked casseroles, and so on: if the food (or its perishable components) have been at room temperature for more than two hours, you should discard that food.
- Wikipedia: Food Safety
- USDA Fact Sheet
- Still Tasty - has information on storage methods/times for almost every food.
Further Reading/Frequently Asked
- Why is it dangerous to eat meat which has been left out and then cooked?
- What is the internal temperature a steak should be cooked to for Rare/Medium Rare/Medium/Well?
- How long can I store a food in the pantry, refrigerator, or freezer?
- What Do I Need To Know About Temperature and Food Safety?
- Is there a problem with defrosting meat on the counter?
- How long can cooked food be safely stored at room/warm temperature?
- Is it really necessary to wash a skillet that will be heated up again soon?
- Is it safe to cook a steak that was left out (raw) for 7 hours?
- Can adequate heating transform spoiled food to safe food?