Once you start raising hens, you quickly discover eggs aren't always clean when you gather them. In fact, sometimes they can be downright disgusting! The good news is there are some things you can do to encourage cleaner eggs.
1. Make sure the bedding in the nesting boxes is clean and plentiful. Also, if broken eggs are a problem, line nesting boxes with outdoor turf (the kind that looks like plastic grass) or nest liners.
2. Keep the bedding in the hen house clean, too. Chickens who walk in muck and manure get it on their feet - and on the eggs they sit upon.
3. Make sure there are enough nesting boxes for your hens. Experts generally advise having one box per four hens. Granted, hens have some funny ideas about nesting boxes. Mine, for example, usually decide only one nesting box is egg worthy, and ignore all the other boxes. Sometimes hens also take a hankering to laying on the floor of the hen house. (In my experience, this usually happens because a hen decides she wants to use a certain nesting box while another hen is in it. Pretty soon, she can't hold it any longer and the egg ends up on the floor. Over time, this problem usually resolves itself, as the hens learn to take turns.)
4. Check for eggs regularly throughout the day, until you know when your hens lay. Unless your hens are new to laying, they usually have a set schedule for laying eggs. Typically, this happens in the morning, but it may change as the seasons change. Prompt removal of eggs tends to mean fewer hens walking on the eggs, hence cleaner eggs. It also reduces the chances of broken eggs - and of hens learning to eat eggs.
5. Make sure hens have clean bottoms. If they are dirty, just wipe them with a warm, damp towel.
Despite all your best efforts, you will probably sometimes find dirty eggs in your nesting box. (Frankly, my experience is that some hens are just tidier than others - just as some people are pig-pens and others are neat-nicks.) The question then becomes: Should you clean dirty eggs before storing them?
Before you laugh and say the answer is obvious, you should know that egg shells have a natural coating (called "bloom") that prevents dirt and germs from being absorbed into the egg itself. Once you wash an egg, that protective coating is gone. Therefore, in my opinion, it's best not to wash eggs until you're ready to use them. I place all my eggs - dirty and apparently clean - into egg cartons; when I'm ready to cook them, I wash them under warm, running water. (Cool or cold water draws germs into the egg.) Other people like to rub obviously dirty eggs with a rough cloth in order to help maintain the egg's bloom.