The Science of Spoilage: Why Experts Agree for Refrigerate Lemon Bars
Food safety experts and government agencies like the USDA and FDA advise that you must refrigerate lemon bars. Their egg-based custard filling makes them a perishable food, prone to rapid bacterial growth if left at room temperature for over two hours.

The sweet and tart lemon bar is a beloved treat, but its ingredients create a pressing food safety question. Due to its egg-based custard filling, food safety experts and government health agencies overwhelmingly agree that you must refrigerate lemon bars to prevent the growth of harmful bacteria. Leaving them at room temperature for extended periods poses a significant health risk.
Key Insights: Lemon Bar Storage Safety
Key Fact | Detail/Statistic |
Primary Risk Factor | The custard filling, made with eggs, creates a prime environment for bacteria like Salmonella and E. coli to grow in the temperature “danger zone.” |
The “Danger Zone” | Bacteria multiply rapidly between 40°F (4°C) and 140°F (60°C). |
Room Temperature Limit | Perishable foods, including egg-based desserts, should not be left out for more than two hours (or one hour if temperatures are above 90°F). |
Proper Storage | Lemon bars should be stored in an airtight container in the refrigerator at or below 40°F (4°C). |
The Science Behind the Spoilage Risk
The core of the issue lies in the lemon bar’s composition. While the shortbread crust is shelf-stable, the luscious lemon filling is a type of custard. This filling is typically made from eggs, sugar, lemon juice, and sometimes butter or flour. According to the U.S. Department of Agriculture (USDA), egg-rich dishes are considered perishable and require refrigeration to slow the growth of foodborne pathogens.
“Any dessert that contains eggs and milk in a custard or cream base falls into the category of foods that require careful temperature control,” explained Dr. Linda Harris, a specialist in food safety at the University of California, Davis. “The proteins and moisture in the egg filling create an ideal breeding ground for bacteria if left at room temperature.”
The primary concern is the potential for bacteria like Salmonella to thrive. While the baking process kills bacteria present in the raw eggs, it does not prevent future contamination or the growth of spores that may have survived. Once the bars cool, they enter the temperature “danger zone”—the range between 40°F (4°C) and 140°F (60°C) where bacteria can double in as little as 20 minutes, as defined by the U.S. Food and Drug Administration (FDA).
Acidity and Sugar: A Limited Defense
Some argue that the high acidity of the lemon juice and the sugar content offer some protection against spoilage. While it’s true that both acid and sugar act as preservatives by creating an inhospitable environment for some microbes, they are not a failsafe, especially in a moist, protein-rich custard.
“While lemon juice is acidic and sugar can inhibit some bacterial growth, these factors alone are not sufficient to render a custard-based dessert safe at room temperature for an extended period,” a report from Cornell University’s Department of Food Science noted. The report clarifies that the overall moisture content and presence of eggs override the preservative effects of sugar and acid in this context.

Official Guidelines on How to Refrigerate Lemon Bars
Food safety agencies are unequivocal in their guidance. The consensus is that any dish containing cooked eggs must be handled with care. The Centers for Disease Control and Prevention (CDC) advises that all perishable foods, which includes desserts like lemon bars, should be discarded if left at room temperature for more than two hours. This window shrinks to just one hour if the ambient temperature is above 90°F (32°C).
To ensure safety and quality, follow these steps for storing and handling lemon bars:
- Cooling: Allow the lemon bars to cool completely at room temperature after baking. This usually takes about one to two hours. Do not leave them out for longer than this two-hour window.
- Storage: Once cool, cover the lemon bars tightly with plastic wrap or store them in an airtight container. This prevents them from drying out and absorbing other odors from the refrigerator.
- Refrigeration: Place the covered bars in the refrigerator. They should be stored at a temperature of 40°F (4°C) or below.
Properly refrigerated, lemon bars will remain safe to eat for up to one week, according to guidance from most university extension programs.

Expert Advice and Common Misconceptions
Despite clear food safety guidelines, misinformation about leaving lemon bars on the counter persists, often spreading through informal recipe blogs and social media. This can create a false sense of security.
“The most common mistake people make is assuming that because a dessert is baked, it is safe to leave out indefinitely,” said a spokesperson for the Partnership for Food Safety Education, a non-profit organization dedicated to preventing foodborne illness. “Baking is just one step. Proper storage afterward is equally critical, especially with egg-based foods.”
This guidance extends to bake sales, potlucks, and other events where food may be left sitting out. Organizers should plan to keep perishable items like lemon bars on ice or in a cooler to maintain a safe temperature.
For those who prefer the taste and texture of room-temperature lemon bars, experts advise removing them from the refrigerator about 15-30 minutes before serving. This allows them to warm up slightly without lingering in the temperature danger zone for too long.