Egg safety: how to buy, store and cook eggs safely
Eggs are cheap and full of protein, but raw and runny eggs carry a small risk of food poisoning. Here is how long eggs last, safe cooking temperatures and who should avoid runny yolks.

Eggs are one of the most useful foods in the kitchen. They are cheap, quick to cook and full of protein. Scrambled, boiled, baked or in a frittata, they work at any meal.
But eggs can carry germs like Salmonella, even when they look clean and perfect. A few simple habits keep that risk low. Here is how to buy, store and cook eggs safely.
- Buy eggs that are cold, clean and not cracked.
- Keep eggs in the fridge at 40°F or below.
- Raw eggs in the shell last about 3 to 5 weeks in the fridge.
- Cook egg dishes to 160°F, or until yolks and whites are firm.
- Pregnant people, young kids, older adults and people with weak immune systems should avoid raw and runny eggs.
Why egg safety matters
The CDC lists eggs among the foods that can carry germs that cause food poisoning. Salmonella is the main germ linked to eggs. It can be inside an egg that looks normal.
Most healthy adults recover from food poisoning in a few days, but it can be serious for some people. The good news is that cooking eggs well and keeping them cold lowers the risk a lot.
Buying eggs
- Buy eggs from a refrigerated case.
- Open the carton and check that no eggs are cracked or dirty.
- Put eggs in your cart last and get them home and in the fridge quickly.
Storing eggs
FoodSafety.gov says to keep your fridge at 40°F or below. Store eggs in their original carton on a shelf inside the fridge, not in the door, where the temperature changes more each time you open it.
| Egg type | Fridge | Freezer |
|---|---|---|
| Raw eggs in the shell | 3 to 5 weeks | Do not freeze in the shell |
| Raw yolks or whites | 2 to 4 days | Up to 12 months |
| Hard cooked eggs | 1 week | Not recommended |
| Egg casseroles and quiche | 3 to 4 days | 2 to 3 months |
These times come from the FoodSafety.gov cold storage chart. The 3 to 5 week time for raw eggs starts from the day you buy them.
Cooking eggs safely
FoodSafety.gov says egg dishes should be cooked to an internal temperature of 160°F. For eggs on their own, cook until both the yolk and white are firm.
| How you cook them | Safe sign |
|---|---|
| Scrambled | No visible liquid egg |
| Fried | Whites and yolks are firm, or flip and cook both sides |
| Boiled | Yolk is fully set |
| Quiche, frittata, casseroles | 160°F in the center |
| Baked goods with eggs | Baked fully as the recipe says |
For a tasty and safe dinner, try our eggs for dinner shakshuka.
Runny yolks and raw eggs
Many people love a soft boiled egg or a runny yolk. For healthy adults, the risk from one egg is low, but it is not zero. Foods that can contain raw or lightly cooked eggs include:
- Raw cookie dough and cake batter
- Homemade Caesar dressing and aioli
- Homemade mayonnaise
- Some mousses and tiramisu
- Eggnog made at home
Store bought versions of these are often made with pasteurized eggs, which are heated to kill germs. You can also buy pasteurized eggs in the shell at many stores. They are a good choice for recipes that use raw or lightly cooked eggs.
Raw dough and batter have another risk too: raw flour can carry germs, so it is best not to taste them before baking.
Who should avoid runny eggs
Some people are more likely to get very sick from food poisoning. The CDC says pregnant women should avoid raw and undercooked eggs and cook eggs until yolks and whites are firm. It is also wise for these groups to take extra care:
- Babies and young children
- Adults over 65
- People with weak immune systems, such as from cancer treatment, diabetes or certain medicines
Our pregnancy food safety guide covers other foods to watch.
Clean hands and tools
FoodSafety.gov says to wash your hands and surfaces often. After cracking raw eggs, wash your hands, and wash any bowls, whisks and counters that touched raw egg. Keep raw eggs away from ready to eat foods. See our post on cutting board safety for more on preventing cross contamination.
Leftovers with eggs
- Refrigerate egg dishes within 2 hours of cooking.
- Eat leftover egg dishes within 3 to 4 days.
- Reheat egg dishes until steaming hot. See how to reheat leftovers safely.
- Do not leave hard boiled eggs out for more than 2 hours, like on an Easter egg hunt or picnic.
Eggs on the go
Hard boiled eggs are a great grab and go protein. Keep them in the fridge and eat them within a week. When you pack them for lunch, use an insulated bag with an ice pack. Peel them just before eating if you can. If eggs are part of a picnic or party spread, keep them on ice, and put leftovers back in the fridge within 2 hours, or within 1 hour if it is hotter than 90°F outside.
FAQ
Is it safe to eat eggs past the date on the carton?
Eggs are often fine for 3 to 5 weeks after you buy them if kept cold. The date is mostly about quality. See our post on food date labels.
Can I eat eggs with a cracked shell?
It is safest to throw out eggs that crack before you get them home. If one cracks on the way, use it soon and cook it fully.
Are brown eggs safer than white eggs?
No. Shell color depends on the breed of hen. It does not change safety or nutrition.
How can I tell if an egg is bad?
If an egg smells bad when you crack it, throw it out. But germs that cause food poisoning do not always change smell, so follow storage times too.
See a doctor if you have food poisoning with a high fever, bloody diarrhea, signs of dehydration or symptoms that last more than a few days.
For more simple, science based tips, get our free 7 day gut reset.
Sources: FoodSafety.gov, Cold Food Storage Chart. FoodSafety.gov, Safe Minimum Internal Temperatures. FoodSafety.gov, 4 Steps to Food Safety. CDC, Preventing Food Poisoning. CDC, Safer Food Choices for Pregnant Women. FDA, Handling Flour Safely: What You Need to Know.
Get new posts by email.
Pick a short weekly email, or one calm digest a month.



