Hard-cooked eggs are a staple of picnics, brown-bag lunches and spring holidays, and because of their handy natural packaging they appear to keep for long periods of time. In truth, however, they are susceptible to bacteria and need to be handled with care.
Susceptibility to Bacteria
When hens lay eggs, they manufacture a protective coating, called the bloom, to protect the chick from infection; commercially processed eggs replace this with a coating of mineral oil. Hard-cooking eggs removes the coating, making it easier for bacteria to enter the egg. Therefore, hard-cooked eggs spoil more readily than their raw counterparts.
The U.S. Department of Agriculture (USDA) recommends refrigerating hard-cooked eggs no more than two hours after they have been cooked, and eating them within a week.
Cracked raw eggs may be contaminated with bacteria; don't buy them. If you crack an egg accidentally, remove it from the shell and refrigerate it in a sealed container. If an egg cracks while being hard-cooked, however, the USDA says it is safe and can be stored just like any other hard-cooked egg.
According to the USDA, safety trumps tradition, and dyed Easter eggs should not be left out overnight in baskets or left on the ground for more than two hours during an Easter egg hunt. Breads decorated with colored eggs should also not be left unrefrigerated for more than two hours, and they should be eaten within three or four days.
If you are going to leave hard-cooked eggs unrefrigerated for longer than a couple of hours, such as for a holiday decoration, mark them in an inconspicuous way so that you will know these are eggs that are not safe to eat.