Crabs usually eat algae. Crabs are omnivorous, meaning that they will eat both plants and other animals for sustenance.
Various species of crab have slightly different diets. They have a very strong digestive system that permits them to eat fungi, mollusks, bacteria, worms and even other crustaceans, such as shrimp or barnacles. In times of desperation, they have been known to eat the offal from the sea floor, which can include dead and decaying animals.
Like most omnivores, crabs require a balanced diet to maintain the highest degree of health and reach their maximum growth potential. Their systems need both the protein found in meat as well as the vitamins present in undersea vegetables to sustain quality digestion.