Have you ever peeled a hard-boiled egg only to find an unappetizing green ring around the yolk? Don’t worry—your eggs aren’t spoiled, and you didn’t do anything terribly wrong. This strange discoloration is actually just a harmless chemical reaction that happens when eggs are cooked a little too long or at too high a temperature.

The science behind it is simple: egg yolks contain iron, and egg whites contain sulfur. When eggs are overcooked, these two elements combine to form iron sulfide, which creates that greenish-gray layer around the yolk. While it might look odd, it’s completely safe to eat. That said, most of us prefer our hard-boiled eggs to have bright, golden yolks without any weird coloring.
The good news? Preventing this reaction is easy. Start by placing your eggs in a single layer in a pot and covering them with cold water—about an inch or two above the eggs. Bring the water to a gentle boil, then immediately turn off the heat. Cover the pot and let the eggs sit for 9 to 12 minutes, depending on how firm you like your yolks.
Once the timer goes off, transfer the eggs to a bowl of ice water. This stops the cooking process and prevents that green ring from forming. Bonus: it also makes the eggs easier to peel! For best results, use eggs that are a few days old rather than super fresh ones, as they peel more smoothly.
With these simple steps, you’ll have perfectly cooked hard-boiled eggs—no weird green rings in sight!