The green ring that sometimes forms around a hard-boiled egg yolk is iron sulfide (FeS). It's caused by a reaction between iron in the yolk and hydrogen sulfide from the white during overcooking.
Hard-boiled eggs sometimes develop a gray-green ring around the yolk, at the boundary between the yolk and the white. It looks unappetizing. It is harmless. The ring is iron sulfide (FeS), formed when iron from the yolk reacts with hydrogen sulfide gas generated from the white during overcooking. The reaction is well understood, the product is non-toxic, and the fix is straightforward. Still, knowing the chemistry is useful because it explains why timing and temperature matter and why the ring appears where it does.
## The Source of the Two Reactants
Egg yolks are naturally rich in iron, mostly bound to the protein phosvitin. A single yolk contains approximately 0.9 milligrams of iron, a meaningful nutritional contribution from a small source. At room temperature, this iron is stable and does not react with surrounding proteins.
Egg whites contain sulfur-containing amino acids, primarily cysteine and methionine, in proteins like ovalbumin and ovotransferrin. When heated, some of these sulfur bonds break down and release hydrogen sulfide (H2S) gas. H2S is the compound responsible for the classic "rotten egg" smell, though at the concentrations produced in normal cooking it is well below detection threshold. Heat accelerates the breakdown. The longer and hotter the cooking, the more H2S is generated.
## The Chemistry of Ring Formation
H2S produced in the white diffuses outward in all directions, but most significantly it diffuses inward toward the yolk, because that is where the reaction product is most stable. At the yolk-white interface, free iron ions (Fe2+) released from yolk proteins at elevated temperatures react with H2S to form iron sulfide: Fe2+ + H2S → FeS + 2H+. FeS is a dark gray-green compound that deposits exactly at the boundary where the two reactants meet, producing the characteristic ring.
The reaction is temperature and time dependent. Eggs cooked gently and removed promptly show little or no ring. Eggs held at high heat for extended periods, or left in hot water well past the point of doneness, show pronounced rings. This explains why the ring is rare in properly cooked eggs and common in cafeteria steam-table eggs that have been sitting in warm water for an hour.
## Prevention and Practical Cooking Notes
The single most effective prevention strategy is the ice bath. As soon as hard-boiled eggs reach their intended doneness, transfer them immediately to ice water. The rapid cooling stops H2S generation in the white and halts iron migration in the yolk. Even a few minutes in hot water after cooking contributes meaningfully to ring formation, so the ice bath should be immediate.
Cooking temperature also matters. Eggs brought to a boil and then immediately removed from heat (rested in hot water for 10 to 12 minutes with the burner off) produce fewer green rings than eggs boiled continuously for 12 minutes because the peak internal temperature is lower and sustained for a shorter time. Older eggs show more pronounced rings than fresh eggs because the pH of older whites is higher (more alkaline), which promotes H2S release.
Iron sulfide is completely non-toxic and the egg tastes the same with or without the ring. The slight sulfurous flavor that sometimes accompanies overcooked eggs comes from the H2S itself, not from the FeS compound.