Aside from the yolk and the white, eggs also have a little bit of air inside them. When you boil the egg, this small pocket of air expands, pushing against the shell of the egg.
If the heat is excessive, the pressure will build until the egg cracks from the stress. Fortunately, there’s a simple way to prevent cracked, overcooked hard-boiled eggs.
The key is to avoid placing eggs directly into boiling water; instead, submerge them in cool tap water, preferably at room temperature so they don’t experience temperature shock.
Then, fire up the stove so the water and the eggs can heat up in sync, perfectly cooking the eggs by the time the water starts to bubble. This method also has another advantage.
Eggshells are porous, allowing air inside to escape as they heat up, resulting in bubbles from the eggs as they boil. Boiling them vigorously can cause rapid bubble formation.
This can force the eggs to bump into each other and crack. Hence, warming the eggs slowly with the water is essential to keep your eggs stable and intact.