Have you ever noticed that some hard-boiled eggs are harder to peel than others? Sometimes the shell doesn't peel back cleanly and leaves a pock-marked texture on the surface of the egg. It turns out this mostly happens with extremely fresh eggs. As eggs grow older, their shells peel more easily. Why is this? In fresh eggs, the albumen (egg white) tends to stick to the inner shell membrane due to the less acidic environment of the egg.
After the eggshell's protective coat slowly wears off, the egg becomes porous, absorbs more air, and releases some of its carbon dioxide. This makes the albumen more acidic, causing it to stick to the inner membrane less. The egg white also shrinks slightly, so the air space between the eggshell and the membrane grows larger, resulting in boiled eggs that are easier to peel.
For ideal peeling, use eggs that are seven to 10 days old.