The underside of a male (top) and a female (bottom) individual of Pachygrapsus marmoratus, showing the difference in shape of the abdomen

Crabs often show marked sexual dimorphism. Males often have larger claws,[11] a tendency which is particularly pronounced in the fiddler crabs of the genus Uca (Ocypodidae). In fiddler crabs, males have one claw which is greatly enlarged and which is used for communication, particularly for attracting a mate.[12] Another conspicuous difference is the form of the pleon (abdomen); in most male crabs, this is narrow and triangular in form, while females have a broader, rounded abdomen.[13] This is because female crabs brood fertilised eggs on their pleopods.

Crabs attract a mate through chemical (pheromones), visual, acoustic, or vibratory means. Pheromones are used by most fully aquatic crabs, while terrestrial and semiterrestrial crabs often use visual signals, such as fiddler crab males waving their large claws to attract females. The vast number of brachyuran crabs have internal fertilisation and mate belly-to-belly. For many aquatic species, mating takes place just after the female has moulted and is still soft. Females can store the sperm for a long time before using it to fertilise their eggs. When fertilisation has taken place, the eggs are released onto the female's abdomen, below the tail flap, secured with a sticky material. In this location, they are protected during embryonic development. Females carrying eggs are called "berried" since the eggs resemble round berries.

When development is complete, the female releases the newly hatched larvae into the water, where they are part of the plankton. The release is often timed with the tides. The free-swimming tiny zoea larvae can float and take advantage of water currents. They have a spine, which probably reduces the rate of predation by larger animals. The zoea of most species must find food, but some crabs provide enough yolk in the eggs that the larval stages can continue to live off the yolk.

Each species has a particular number of zoeal stages, separated by moults, before they change into a megalopa stage, which resembles an adult crab, except for having the abdomen (tail) sticking out behind. After one more moult, the crab is a juvenile, living on the bottom rather than floating in the water. This last moult, from megalopa to juvenile, is critical, and it must take place in a habitat that is suitable for the juvenile to survive.[14]:63–77

Most species of terrestrial crabs must migrate down to the ocean to release their larvae; in some cases, this entails very extensive migrations. After living for a short time as larvae in the ocean, the juveniles must do this migration in reverse. In many tropical areas with land crabs, these migrations often result in considerable roadkill of migrating crabs.[14]:113–114

Once crabs have become juveniles, they will still have to keep moulting many more times to become adults. They are covered with a hard shell, which would otherwise prevent growth. The moult cycle is coordinated by hormones. When preparing for moult, the old shell is softened and partly eroded away, while the rudimentary beginnings of a new shell form under it. At the time of moulting, the crab takes in a lot of water to expand and crack open the old shell at a line of weakness along the back edge of the carapace. The crab must then extract all of itself – including its legs, mouthparts, eyestalks, and even the lining of the front and back of the digestive tract – from the old shell. This is a difficult process that takes many hours, and if a crab gets stuck, it will die. After freeing itself from the old shell (now called an exuvia), the crab is extremely soft and hides until its new shell has hardened. While the new shell is still soft, the crab can expand it to make room for future growth.[14]:78–79

Crabs are mostly active animals with complex behaviour patterns. They can communicate by drumming or waving their pincers. Crabs tend to be aggressive towards one another, and males often fight to gain access to females.[20] On rocky seashores, where nearly all caves and crevices are occupied, crabs may also fight over hiding holes.[21]Fiddler crabs (genus Uca) dig burrows in sand or mud, which they use for resting, hiding, and mating, and to defend against intruders.[14]:28–29, 99

Crabs are omnivores, feeding primarily on algae,[22] and taking any other food, including molluscs, worms, other crustaceans, fungi, bacteria and detritus, depending on their availability and the crab species. For many crabs, a mixed diet of plant and animal matter results in the fastest growth and greatest fitness.[23][24] However, some species are more specialised in their diets. Some eat plankton, some eat primarily shellfish like clams, and some even catch fish.[14]:85

Crabs are known to work together to provide food and protection for their family, and during mating season to find a comfortable spot for the female to release her eggs.[25]

In some species, crab meat is harvested by manually twisting and pulling off one or both claws and returning the live crab to the water in the belief the crab will survive and regenerate the claws, thereby making it a sustainable industry.[27][28][29][30]

Crabs are prepared and eaten as a dish in several different ways all over the world. Some species are eaten whole, including the shell, such as soft-shell crab; with other species, just the claws and/or legs are eaten. The latter is particularly common for larger crabs, such as the snow crab. Mostly in East Asian cultures, the roe of the female crab is also eaten, which usually appears orange or yellow in fertile crabs.

For the British dish Cromer crab, the crab meat is extracted and placed inside the hard shell. One American way to prepare crab meat is by extracting it and adding a flour mix, creating a crab cake. Crabs are also used in bisque, a global dish of French origin.

Imitation crab, made from minced fish products that are crafted to resemble crab meat, is disdained throughout the culinary industry as an unacceptably low-quality substitute for real crab. This does not hinder its popularity in Japan (where it originated) and in home cooking, where cost is often a chief concern.[31]

Crabs are often boiled alive. In 2005, Norwegian scientists concluded that crustaceans could not feel pain.[32] However, a study by Bob Elwood and Mirjam Appel of Queens University in Belfast, found that hermit crabs reacted to electric shocks. This may indicate that some crustaceans are able to feel and remember pain.[33][34]

The infraorder Brachyura contains 6,793 species in 93 families,[19] as many as the remainder of the Decapoda.[35] The evolution of crabs is characterised by an increasingly robust body, and a reduction in the abdomen. Although many other groups have undergone similar processes, carcinisation is most advanced in crabs. The telson is no longer functional in crabs, and the uropods are absent, having probably evolved into small devices for holding the reduced abdomen tight against the sternum.

In most decapods, the gonopores (sexual openings) are found on the legs. However, since crabs use the first two pairs of pleopods (abdominal appendages) for sperm transfer, this arrangement has changed. As the male abdomen evolved into a narrower shape, the gonopores have moved towards the midline, away from the legs, and onto the sternum.[36] A similar change occurred, independently, with the female gonopores. The movement of the female gonopore to the sternum defines the cladeEubrachyura, and the later change in the position of the male gonopore defines the Thoracotremata. It is still a subject of debate whether those crabs where the female, but not male, gonopores are situated on the sternum, form a monophyletic group.[35]