Collections of seashells are a popular chlldhood hobby, and a convenient way to preserve memories of vacations at the beach. One of the first things most collectors learn is that seashells with anything left in them tend to smell pretty strongly after a while. Whether the offending odor is caused by a hermit crab or the original occupant, it is important that it be removed.
Locate an anthill. Leave your shells on the anthill for a day or two, during dry weather. The ants will diligently clean every scrap of flesh from inside the shell, including crevices that are difficult to reach any other way.
Bury your seashells in a clearly marked location for a few weeks to a few months, the longer the better. Insects, worms and various microorganisms will clean out your shells, and this method leaves very little odor.
Sciencing Video Vault
Freeze, thaw, and boil the shells. The crab, and any remaining original flesh, will then slide out easily at the end of a toothpick. This works best if the shells are frozen and thawed at least twice.
Bleach the shells or soak them in pure alcohol to remove any lingering smell. Some shells can be damaged by soaking, so consult a reference work or a more experienced collector if you have not previously collected a given specimen.
TL;DR (Too Long; Didn't Read)
If you wish to preserve the actual crab's shell, you will need to separate it joint by joint to clean, and then reassemble it later. The anthill method is the best for this, and works best if you separate the top and bottom halves of the shell.