As soon as an egg is laid, a variety of physical and biological changes start to take place. The thick white becomes thinner and the membranes in the egg weaken. Water is lost through the porous shell, so enlarging the air sac at the base of the egg. Bacteria may also enter through the shell and odours from outside may be absorbed, eg strong cheese or garlic in a fridge. But the distinctive rotten egg smell is brought about by the bacterial breakdown of protein, which produces hydrogen sulphide and other related compounds. Roy Ballam, British Nutrition Foundation
There are many simple tests to check whether or not an egg is fresh - for example, if it sinks in water then it is usually okay. But the only sure-fire test is to crack it open and take a sniff. Does the bouquet remind you of your old school football socks? If so, it's definitely rotten.