An eggshell is a membrane made of calcium carbonate crystals, porous enough to allow air and moisture to pass through. The outermost layer of the shell protects the egg from bacterial contamination. If the shell cracks, bacteria is free to invade the egg white and yolk, rendering the egg unfit for consumption under some circumstances. In the case of a hard-boiled egg, how the egg cracks dictates whether or not it is safe to eat.
Cracked Before Purchase
Always inspect eggs carefully before purchase. Open the carton and inspect each egg from all sides. Even the tiniest crack in an egg is an invitation for Salmonella Enteritidis, the most common bacteria that contaminates eggs. Accidental exposure to SE can cause foodborne illnesses. If you notice a cracked egg in a pack, choose another. If you are hard boiling an egg and suspect that it was cracked when you bought it, do not eat it -- throw it away.
Saving an Egg
An egg that you crack on the way home from the store or during transport is not a candidate for hard-boiling. Instead, the egg requires immediate cracking and disposal of the shell. Crack the shell open and drop the egg white and yolk into a clean container. Cover the container tightly and refrigerate. Be sure to cook it within two days.
Cracking During Boiling
Cracking during the hard-boiling process is a problem that even seasoned chefs encounter from time to time. Eggs that crack during boiling may not look as nice as ones that don’t but are still safe to eat. If you are not planning to eat the cracked hard-boiled egg, store it in the refrigerator immediately after cooking. Like all hard-boiled eggs, one with a crack should be eaten within one week.
Hard-boiling perfect eggs starts with placing them in a single layer within the saucepan. Fill the pan with just enough water to cover the eggs, plus an extra inch. Cover the saucepan and turn the heat to medium-high. As soon as the water boils, remove the pan from the heat. Allow the eggs to sit in the hot water, covered, for 15 minutes. Then, transfer the eggs from the hot water to a cold water bath to cool.