can you get food poisoning from cake
In this article
Yes, you can get food poisoning from cake, though it is not common. The usual causes are raw or undercooked batter (raw eggs or raw flour), cream or custard fillings left out too long, and cakes that were stored badly.
What can make a cake unsafe
- Raw batter: the FDA says flour is a raw food that can carry bacteria such as E. coli, and advises never to eat or taste raw flour, dough or batter. Raw eggs can carry Salmonella.
- Undercooked cake: a cake that is still wet and raw in the middle has not been cooked through. The FDA says cooking is the only way to be sure foods made with flour and raw eggs are safe.
- Time out of the fridge: the FDA says perishables should go in the fridge within 2 hours, or 1 hour when it is above 90°F. Cakes with cream, custard or egg-based fillings count as perishable.
- Dirty hands, tools or surfaces: bacteria can pass to the cake from other foods.
Undercooked cake
If a baked cake was only slightly underdone, the risk depends on what is in it and how raw it was. Raw egg in the middle is the main worry. If the centre is still liquid batter, bake it longer or do not eat that part. If you ate some and feel fine, watch for the symptoms below.
Cakes that need the fridge
Plain sponge or butter cakes with dry frosting are generally less risky than cakes with fresh cream, custard or cream cheese fillings. Follow the storage advice of the baker or the label. The FDA advises keeping the fridge at or below 40°F and checking it with a thermometer.
Raw egg icings and frostings
If a recipe uses raw egg, use pasteurised eggs or pasteurised egg product, as the FDA advises for recipes that use raw or lightly cooked eggs.
Can a cake cause vomiting or make you sick?
Food poisoning can cause diarrhea, stomach pain, nausea, vomiting and fever. Symptoms vary by germ and can start within hours or take days. A cake can also upset the stomach for other reasons, such as an allergy or just very rich food.
When to see a doctor
The CDC lists these as severe symptoms that need a doctor: bloody diarrhea, diarrhea lasting more than 3 days, fever over 102°F, vomiting so often you cannot keep liquids down, and signs of dehydration. Pregnant people should call a doctor if they have fever and flu-like symptoms. This page is general information, not medical advice.
How to lower the risk
- Do not taste raw batter. Wash hands and tools after handling raw eggs and flour.
- Bake until a skewer comes out clean.
- Refrigerate cakes with cream, custard or egg fillings within 2 hours of making or serving.
- Use pasteurised eggs for uncooked icings.
- If a cake smells off or looks mouldy, throw it away.
Sources
- FDA: What you need to know about egg safety (checked 2026-11-12)
- FDA: Handling flour safely (checked 2026-11-12)
- FDA: Safe food handling (checked 2026-11-12)
- CDC: Signs and symptoms of food poisoning (checked 2026-11-12)
About