However, if you’re concerned about food waste, you don’t have to worry too much. You don’t have to throw away every single egg every time it cracks. If the crack has not pierced the protective membrane of the shell, then it is probably still safe to eat because the bacteria would not be able to penetrate the egg’s yolk. To be safe, all eggs with a cracked exterior should be thoroughly cooked at a high heat before consuming, to ensure that any bacteria that may have potentially entered through the hairline fracture is burned off, per Eat or Toss.
According to the USDA, if the egg cracks while it is in your possession, such as while you are driving home from the store, it is still most likely safe to use if you quickly seal it in an airtight container to prevent bacteria from getting inside the crack. Simply keep the egg refrigerated and be sure to use it within a few days, and make sure to cook it thoroughly before consuming it. Similarly, eggs that crack while you are hard boiling them are also safe to eat, because there is little chance that harmful bacteria will survive the cooking process. To avoid the risk of potentially coming into contact with harmful bacteria, use caution when transporting your eggs, and always be sure to inspect your carton for cracks at the grocery store before taking it home.