You’ve probably seen a greenish ring around the yolk of a hard-boiled egg and wondered what went wrong. Although it may not look appealing, the discoloration is harmless and usually happens when eggs are cooked for too long. During overcooking, sulfur from the egg white reacts with iron in the yolk, creating iron sulfide and producing the familiar green ring.
The easiest way to prevent it is to control both cooking time and temperature. Bring the water to a boil, add the eggs, then cook them at a gentle simmer for about 9 to 12 minutes, depending on their size. Avoid leaving them in boiling water longer than necessary.
As soon as the eggs are cooked, transfer them to an ice bath or cold water to stop the cooking process. Cooling them quickly can also make peeling easier. Using slightly older eggs may help with peeling as well, while any hard-boiled eggs you aren’t eating immediately should be stored in the refrigerator.