Overcooking a hard-boiled egg causes the iron in the yolk to react with the hydrogen sulfide in the egg white to form iron sulfide. This is what gives the egg yolk a greenish tinge.
Egg yolk contains iron. When heat is applied to the yolk long enough, iron from the yolk reacts with the hydrogen sulfide (present in the white of the egg) to form iron sulfide, which is what imparts the greenish tinge to the overcooked egg.
If you’ve ever accidentally overcooked a hard-boiled egg, you’ve surely noticed that the area where the yolk meets the egg white often becomes greenish. Have you ever wondered why?
What Happens When An Egg Is Boiled?
Proteins are one of the primary components of an egg. The white of an egg is 12% protein, while the yolk is composed of 16% protein. The proteins found in egg whites are actually long molecules, composed of chains of amino acids that are linked together.
When the egg is raw, these proteins are all tangled up with each other, but when the egg is boiled, i.e., when heat is applied to the egg, these proteins unfold and form new bonds among themselves.

Such a change in the original (or native) structure of proteins (or nucleic acids) in the presence of heat (or other external agents, such as a strong acid or base, or an organic solvent, like chloroform or alcohol) is called the denaturation of proteins.
The longer you continue to heat the egg, the closer the proteins get to one another and coagulate, forming additional bonds within their clusters. That’s why an egg becomes hard when boiled, hence the name ‘hard-boiled’ egg.
Overcooking A Hard-boiled Egg
As mentioned earlier, egg whites contain proteins. Those proteins, in turn, contain a small amount of sulfur. During denaturation (i.e., when you boil the egg), the sulfur in the proteins of the egg white combines with hydrogen to form hydrogen sulfide. Now, one thing that you should know about hydrogen sulfide is that it stinks! Big time!
Ask anyone with a degree in chemistry about the first thing that comes to their mind when you say ‘hydrogen sulfide’, and in all likelihood, their initial response will include the mention of its unbelievably foul smell.
Since it’s heavier than both nitrogen and oxygen – the two primary gases found in our atmosphere – hydrogen sulfide is found in low wells, caves and mines. Apart from being horribly stinky, it’s also quite poisonous and highly flammable – to the point of being violently explosive.

You might have guessed by now that the characteristic “rotten egg” smell is actually hydrogen sulfide gas. Fortunately for all you egg lovers out there, the volume of hydrogen sulfide released from an overcooked egg is so minuscule that it doesn’t pose a threat to anyone in the vicinity.
The Green Color Of An Overcooked Hard Boiled Egg
Every egg yolk contains iron, which is released when the egg is heated long enough. When these iron cations interact with hydrogen sulfide (around the region where the egg white meets the yolk), a chemical reaction takes place between the two chemicals and produces iron(II) sulfide (FeS), a gray-green solid.

It’s the iron sulfide formed as a result of the aforementioned chemical reaction that imparts that distinctive greenish hue around the yolk of the egg. The more heat you apply, the more coloration you will see in the egg.
The same thing happens when you cook eggs in a container made of iron (such as an iron skillet). The iron present in the container reacts with the hydrogen sulfide from the egg white and gives the overcooked egg a grayish-green color.
How Much Iron Is Actually In An Egg?
We keep saying the yolk contains iron, so the obvious next question is: how much? According to the USDA's FoodData Central database, hard-boiled whole egg holds about 1.19 mg of iron per 100 g. A standard large egg weighs roughly 50 g, so a single boiled egg gives you only about 0.6 mg of iron. That isn't much when you consider that an adult man needs around 8 mg a day and a menstruating woman needs about 18 mg. Almost all of it sits in the yolk; the white is mostly water and protein with barely a trace of iron.
Here's the twist that surprises a lot of people: the iron in an egg is non-heme iron, the same kind found in plants like spinach and beans, even though an egg is an animal food. Heme iron (the type in red meat) is absorbed far more readily. Worse, most of the iron in the yolk is locked onto a phosphorus-rich protein called phosvitin, which clings to it tightly and forms a complex your gut struggles to break apart. One study found that whole eggs and egg whites can reduce dietary iron absorption in adults by up to 27%. The practical upshot? Eggs are a decent source of protein, but a fairly weak way to top up your iron. Pairing them with a vitamin C source, like a glass of orange juice or some bell pepper, helps your body pull more of that non-heme iron across, which is one reason the classic breakfast of eggs and citrus actually makes nutritional sense.
Where Does The Sulfur In An Egg Come From?
The other reactant in our green-ring story is sulfur, and a common question is exactly where it hides in the egg. The sulfur isn't a free-floating mineral; it's built into the egg's proteins. Specifically, it lives in two of the amino acids that make up those proteins: cysteine and methionine, which are the two main sulfur-containing amino acids in our food. The egg white is especially rich in them, which is why the white, not the yolk, is the source of the smelly gas.
When you heat the egg and its proteins denature and unravel, those sulfur-bearing side chains become exposed and start breaking down, releasing tiny amounts of hydrogen sulfide (H2S). The longer and hotter you cook, the more H2S is set free, and the more of it can drift toward the yolk to meet the iron waiting there. So the sulfur and the iron were inside the egg the whole time, sitting harmlessly in separate proteins; cooking is simply what coaxes them out and lets them find each other.
Is It Safe To Eat An Overcooked Egg, And How Do You Avoid The Green Ring?
If you've ever sliced into a boiled egg, spotted that gray-green halo and quietly wondered whether you were about to poison yourself, you can relax. An overcooked egg with a green ring is perfectly safe to eat. Food scientists at the University of Illinois note that while the green color and slightly chalky texture might be off-putting, the eggs are safe, and from a food-safety standpoint a slightly overcooked egg is actually safer than an undercooked one. The iron(II) sulfide responsible for the color is harmless in the trace amounts involved; it is essentially the same kind of iron compound found in some iron supplements. The University of Nebraska's extension service sums it up bluntly: the green ring is unattractive, but not harmful.

What you lose is quality, not safety. An egg cooked long enough to turn green tends to be rubbery, dry and a little sulfurous, which is less than ideal if you're slicing it onto a salad. The good news is that the green ring is easy to prevent, because it's almost always a sign of overcooking. The fix is to stop cooking sooner and to cool the egg fast. Rather than boiling hard for 15 minutes, bring the water to a boil, then turn off the heat, cover the pot and let the eggs sit in the hot water for around 12 minutes (a little longer for very large eggs). The moment they're done, plunge them into cold or ice water to halt the cooking. That quick chill stops the heat-driven reaction in its tracks and gives you a bright yellow yolk every time.
References (click to expand)
- Denaturation (biochemistry) - Wikipedia. Wikipedia
- Egg white - Wikipedia. Wikipedia
- Hydrogen sulfide - Wikipedia. Wikipedia
- Science of Cooking: Deviled Eggs: What's Going On?. The Exploratorium
- Why do eggs "hard-boil?" | SciBytes | Learn Science at Scitable. Nature
- Egg, whole, cooked, hard-boiled (iron content). FoodData Central, USDA
- The Effects of 1 Egg per Day on Iron and Anemia Status among Young Malawian Children. PMC, NCBI
- Dietary Iron. StatPearls. NCBI Bookshelf
- Iron - Health Professional Fact Sheet. Office of Dietary Supplements, NIH
- Sulfur containing amino acids and human disease. PMC, NCBI
- Solved! Here's Why Your Hard-Boiled Eggs Have Green Yolks. University of Illinois
- How to Avoid a Green Ring on Hard-Boiled Egg Yolks. University of Nebraska-Lincoln













