Crabs are decapod crustaceans, either the Brachyura (the "true crabs") or various groups within the closely related Anomura, characterised by having a heavily armoured shell, their tail segments concealed under the body, the ability to run sideways, and the habit of hiding in rocky crevices. They do not form a single natural group or clade, but have convergently evolved multiple times from the ancestral decapod body plan through the process of carcinisation. As a group they are thus polyphyletic.
Crabs vary in size from the pea crab, a few millimeters wide, to the Japanese spider crab, with a leg span up to 4 m (13 ft). Many crabs are free-living marine omnivores; others are specialist herbivores or carnivores, while some are parasitic. A substantial number of species are adapted to freshwater or other non-marine habitats.