Yes, most homemade and store-bought icings need to be refrigerated, but the exact rule depends on the ingredients. Buttercream, cream cheese, and whipped cream icings must be refrigerated within 2 hours of use, while pure royal icing and many commercial glazes can sit at room temperature for days. The short answer is: if your icing contains dairy, eggs, or fresh fruit, refrigerate it; if it is sugar-based with no perishable liquid, it can stay out.
Why Refrigeration Matters for Icing
Icing is essentially a mixture of sugar, fat, and sometimes liquid. The sugar acts as a preservative, but it does not protect against bacteria when moisture and protein are present. Dairy-based icings—buttercream, cream cheese, mascarpone, and whipped cream—are high in moisture and fat, making them a perfect breeding ground for Staphylococcus aureus and other pathogens if left at room temperature. The USDA’s 2-hour rule applies to any perishable food, including frosted cakes and cupcakes. After 2 hours at room temperature (or 1 hour if the room is above 90°F), bacteria can multiply to dangerous levels.
Even icings that seem “safe” because they are mostly sugar, like a simple powdered sugar glaze, can spoil if you added milk, cream, or citrus juice. The water activity in those add-ins is enough to support microbial growth over several hours. On the other hand, a classic royal icing made only with egg whites (or meringue powder) and powdered sugar dries hard and has very low water activity—bacteria cannot survive without water, so it can stay out for days.
How Different Icing Types Behave
- Buttercream (American, Swiss, Italian, German): Contains butter, which is dairy. Must be refrigerated after 2 hours at room temp. It can sit out briefly for serving, but never overnight.
- Cream cheese frosting: Highly perishable due to cream cheese. Refrigerate within 2 hours; do not leave out for more than 2 hours total.
- Whipped cream frosting: Contains heavy cream, which spoils quickly. Refrigerate immediately after frosting; serve within 2 hours.
- Royal icing: Made with egg whites or meringue powder and powdered sugar. Dries hard, safe at room temperature for days if kept dry. Once dry, it is shelf-stable.
- Fondant: Sugar-based, no dairy. Can stay at room temperature for weeks if wrapped tightly. Refrigeration causes condensation and makes it sticky.
- Ganache (chocolate + cream): Contains cream, so it must be refrigerated after 2 hours. However, a ganache made with only chocolate and a little liquid can firm up at room temp, but still treat it as perishable.
- Glaze (powdered sugar + milk/juice): If it contains milk or juice, refrigerate. If it is just sugar and water, it can stay out.
How to Store Iced Cakes and Cupcakes
For any cake with dairy-based icing, the rule is: refrigerate within 2 hours. Place the cake in an airtight container or cover it loosely with plastic wrap to prevent the icing from absorbing fridge odors. Before serving, let it sit at room temperature for 30–60 minutes—this brings back the soft texture. Buttercream hardens in the fridge, so do not serve it straight from cold.
For royal-iced cookies or gingerbread houses, no refrigeration is needed. Keep them in a cool, dry place, uncovered or in a cardboard box, so the icing can dry completely. Humidity is the enemy—moisture will make royal icing soften and become sticky.
If you are transporting a frosted cake in warm weather, use a cooler or insulated bag. The 2-hour rule shrinks to 1 hour when the temperature is above 90°F. Never leave a dairy-frosted cake in a hot car.
How Long Does Icing Last in the Fridge?
Properly stored in an airtight container, most dairy-based icings last:
- Buttercream: 1–2 weeks in the fridge, up to 3 months in the freezer.
- Cream cheese frosting: 1 week in the fridge, 2 months in the freezer.
- Whipped cream frosting: 2–3 days in the fridge; does not freeze well.
- Ganache: 1 week in the fridge, 3 months in the freezer.
- Royal icing (unused, in a bowl): 2 weeks in the fridge, but it can also sit at room temp for a few days if covered.
Always check for signs of spoilage: off smell, mold, separation, or a sour taste. When in doubt, throw it out.
Common Misconceptions About Icing Storage
“Sugar preserves everything.” Sugar does lower water activity, but only when the sugar concentration is high enough. In a buttercream, the butter provides enough water (about 15%) to allow bacteria to grow. The sugar alone does not make it safe.
“If it looks fine, it’s safe.” Bacteria do not always change the appearance or smell of food. Cream cheese frosting can harbor pathogens without any visible sign. Always follow time-based rules, not visual cues.
“You can leave a frosted cake out overnight if it’s covered.” No. Covering does not stop bacterial growth; it only prevents drying. The 2-hour rule still applies.
“Freezing kills bacteria.” Freezing stops growth but does not kill bacteria. Once thawed, the bacteria resume multiplying. Always thaw in the fridge, not at room temperature.
How to Choose the Right Icing for Your Event
If you are baking for a picnic, a backyard party, or a bake sale where refrigeration is unavailable, choose a shelf-stable icing:
- Royal icing (on cookies or as a drizzle)
- Fondant (on cakes)
- Simple sugar glaze (no dairy)
- Marzipan (almond paste, but check if it contains egg whites)
For a birthday cake that will be eaten within a few hours, buttercream or cream cheese is fine—just keep it out of direct sun and serve within 2 hours. If you need to prepare a cake a day ahead, refrigerate it, then bring to room temp before serving.
Safety Tips for Handling Icing
- Always wash your hands before frosting a cake.
- Use clean spatulas and piping bags; do not reuse any utensil that touched raw batter.
- If you are using raw egg whites in royal icing, use pasteurized egg whites or meringue powder to avoid salmonella risk, especially for children, elderly, or pregnant people.
- Never leave a dairy-frosted cake out for more than 2 hours total (including serving time).
- When storing leftover frosted cake, wrap it tightly and refrigerate within 2 hours of cutting.
- Reheat leftover frosted cake? Do not microwave—it will melt the icing. Let it come to room temp instead.
Frequently Asked Questions
Can I leave a buttercream cake out overnight?
No. Buttercream contains butter, which is dairy. The USDA recommends discarding any perishable food left at room temperature for more than 2 hours. Overnight is far beyond that, so the cake should be refrigerated.
Does royal icing need to be refrigerated?
No. Royal icing dries hard and has very low water activity, so it is safe at room temperature for days. In fact, refrigeration can introduce moisture and make it sticky. Store royal-iced cookies in a dry, cool place.
Can I freeze a cake with cream cheese frosting?
Yes, you can freeze a cream cheese-frosted cake for up to 2 months. Wrap it tightly in plastic wrap and then foil. Thaw in the refrigerator overnight, then bring to room temperature before serving. The texture may be slightly different but still safe.
How do I know if icing has gone bad?
Look for mold (green, black, or white spots), a sour or rancid smell, or a watery separation. If the icing has been in the fridge for longer than the recommended time, discard it. Even if it looks fine, if it’s past the time limit, throw it out.
Is it safe to eat icing that has been left out for 3 hours?
No. After 2 hours at room temperature, perishable icings (buttercream, cream cheese, whipped cream) are in the danger zone (40°F–140°F) where bacteria multiply rapidly. Discard any leftover icing or cake that has been out that long.
Can I use pasteurized egg whites in royal icing?
Yes, pasteurized egg whites are safe for royal icing because they eliminate the risk of salmonella. You can also use meringue powder, which is the standard for commercial baking. Always follow the recipe’s proportions.