
Most crabs are opportunistic omnivores and scavengers, taking algae, detritus, worms, molluscs, small crustaceans, fish and carrion in whatever proportion the habitat supplies.
The exceptions matter more than the rule. Fiddler crabs sift sediment for microscopic algae and bacteria, sand crabs strain plankton out of the surf with feathery antennae and never scavenge at all, blue crabs eat other blue crabs in large numbers, and one deep-sea group farms bacteria on its own claws. Diet in this group follows the feeding equipment, not the family name.
- Described species of true crabAbout 7,000
- Where a crab chews its foodIn the stomach, on a gastric mill
- Sand crab feeding methodFiltering plankton, not scavenging
On this page
How a crab gets food into itself
The claws do the gathering. A crab uses its chelipeds to tear, pick, crack or scoop, and then passes fragments inward through three pairs of maxillipeds, a conveyor of small mouthparts that sort and hold while the mandibles break the pieces down. Nothing is chewed at this stage in the way a mammal chews.
The grinding happens after swallowing. Inside the foregut sits a gastric mill, a set of hardened chitinous teeth that mashes food against a filtering chamber before anything passes to the digestive gland. Because the crushing is internal, a crab can swallow material that looks far too coarse for its mouth, which is part of why the group manages such a wide range of diets.
That range is the point. Across roughly 7,000 described species of true crab, the default is opportunistic omnivory: whatever is edible, dead or alive, plant or animal. The old line that crabs feed mainly on vegetation is not supportable — algae and detritus matter enormously to some groups and hardly at all to others, and most species take animal protein whenever it is available.
One clarification is worth making early. Hermit crabs are not true crabs at all. They sit in a separate group, the anomurans, alongside squat lobsters and king crabs, and their feeding habits are their own.
What hermit crabs eat
Hermit crabs are generalist scavengers, and on a tropical beach that means almost anything organic: fallen fruit, decaying leaves, washed-up seaweed, dead fish and crustaceans, animal droppings, and the film of algae and bacteria growing on rock. Marine species living on reefs pick detritus off the substrate and scrape at algae between shelters. Land hermit crabs will travel a long way inland after a fruit fall.
Shell material is part of the diet rather than an accident. A crab needs calcium carbonate to harden a new exoskeleton after each moult, and hermit crabs chew on empty shells, cuttlebone and limestone for it. Many also eat their own shed exoskeleton, which is the cheapest calcium available to them.
Kept as pets, they need the same spread: a protein source such as dried shrimp or cooked fish, fresh fruit and vegetables, a calcium source left permanently in the tank, and both fresh and salt water to drink from. Commercial hermit crab pellets are a base rather than a complete diet, and a tank fed only on pellets tends to produce crabs that moult badly.

What sand crabs eat
This is where most guides go wrong, including the earlier version of this page. Sand crabs, also called mole crabs, are not scavengers and do not hunt along the shoreline. They are filter feeders, and they are extremely specialised ones.
A mole crab burrows backwards into the swash zone until only its eyes and antennae clear the sand, facing seaward. As a wave retreats it unfurls a pair of long, feathery second antennae into the outflowing water and strains plankton from it — largely single-celled algae, including the dinoflagellates that cause red tides. The antennae are then wiped clean by the mouthparts and the animal reburies before the next wave. It does not leave the swash line to feed, and it cannot process carrion or seaweed.
That feeding method has a consequence worth knowing. Because mole crabs concentrate whatever is suspended in the surf, they accumulate the toxins produced by harmful algal blooms, and they are used as an indicator species for exactly that reason. The animals that do scavenge the strandline are different: ghost crabs patrol the dry beach at night for carrion, turtle hatchlings and mole crabs themselves.

What blue crabs eat
The blue crab, Callinectes sapidus, is a predator that scavenges when it suits, not the other way round. Stomach studies from Chesapeake Bay estuaries put thin-shelled bivalves at the top of the list — soft-shell clams and Baltic clams that the crab cracks or chips at the shell margin — followed by other crustaceans, marine worms, small fish, and plant material and detritus that it takes alongside everything else.
What stands out is cannibalism. Blue crabs eat smaller blue crabs routinely, and predation by their own species is one of the largest sources of mortality for juveniles in a nursery habitat. A crab that has just moulted is soft for hours and is taken by anything nearby, including its relatives, which is why young crabs stay hidden in eelgrass and marsh grass until the shell hardens.
The last pair of legs is the giveaway about how the animal lives. They are flattened into paddles, making the blue crab a genuine swimmer rather than a bottom walker, and that mobility is what lets it hunt across open estuary bottom instead of waiting for food to arrive.

What eats crabs, including several sharks
Crabs sit near the middle of most coastal food webs, which means the list of things that eat them is long: octopus, rays, seabirds, otters, raccoons, larger fish and, constantly, other crabs. Sharks belong on that list more often than people expect, and the ones that specialise in shellfish are easy to identify because their teeth give them away.
Flat crushing plates rather than cutting blades are the marker. The horn shark and the Port Jackson shark carry small grasping teeth at the front and broad molar-like plates at the back, built for crushing crabs, urchins and molluscs. The nurse shark takes a different route and sucks prey out of crevices with a powerful buccal pump. The leopard shark works sand flats for crabs, clams and fish eggs, and the epaulette shark walks across reef flats on its fins hunting crustaceans in water too shallow for anything else.
Even the filter feeders take crabs, though at a much earlier stage. Whale sharks gather at coastal spawning events to strain crab and other crustacean larvae out of the water in enormous numbers. If you want the tooth shapes behind all this, how many teeth do sharks have covers them, the full range of diets is in the weirdest things sharks have eaten, and types of sharks lists every species with its own feeding notes.
Frequently asked questions
What do crabs eat in the wild?
Most crabs are opportunistic omnivores taking algae, detritus, worms, molluscs, small crustaceans, fish and carrion in whatever mix the habitat offers. The proportions vary enormously by species: fiddler crabs sift sediment for microalgae, blue crabs hunt clams and other crabs, and sand crabs filter plankton and eat nothing else.
Do crabs eat plants or meat?
Both, in almost every case, but the old claim that vegetation makes up most of a crab's diet does not hold. Algae and plant detritus are important to grazing and deposit-feeding species, while predatory crabs such as the blue crab take animal protein whenever it is available and treat plant material as a supplement.
What do hermit crabs eat?
Fallen fruit, decaying leaves, seaweed, carrion, algae films and droppings — they are generalist scavengers. They also deliberately eat calcium-rich material such as empty shells, cuttlebone and their own shed exoskeleton, because each moult needs calcium carbonate to harden the new shell underneath.
What do sand crabs eat?
Plankton, filtered directly from the water. A sand crab buries backwards in the swash zone facing seaward and unfurls two feathery antennae into each retreating wave, straining out single-celled algae and other suspended particles. It is not a scavenger and cannot feed on carrion or stranded seaweed.
What do blue crabs eat?
Thin-shelled clams first, then other crustaceans, worms, small fish, plant material and detritus. Cannibalism is a large part of the picture: blue crabs eat smaller blue crabs regularly, and that predation is one of the main causes of death among juveniles before they reach the safety of dense marsh grass.
What should I feed a pet crab?
Match the wild diet and keep it varied. For hermit crabs that means a protein source such as dried shrimp or cooked fish, fresh fruit and vegetables, a permanent calcium source such as cuttlebone, and both fresh and salt water available. Commercial pellets work as a base but not as the whole diet.
Do sharks eat crabs?
Several do, and their teeth show it. Horn sharks and Port Jackson sharks carry flat crushing plates at the back of the jaw for shellfish, nurse sharks suck prey out of crevices, and leopard and epaulette sharks work sand flats and reef shallows for crustaceans. Whale sharks strain crab larvae from the plankton.
How do crabs chew their food?
They barely chew it at the mouth. Claws tear food into fragments, maxillipeds pass them inward and the mandibles break them down further, but the real grinding happens after swallowing, on a gastric mill inside the stomach made of hardened chitinous teeth that mash the food before it reaches the digestive gland.
References

A small team focused on researching sharks and making marine biology easy to understand. Every page is reviewed against current species records and the SharkSider attack database, and updated when new incidents or research appear.
Published February 18, 2023 · Last updated September 23, 2026 · Filed under FAQ.






