Hermit crabs are scavengers and will eat dead animals, including their own kind. This cannibalism is natural and provides protein, especially when food is scarce.
They also eat fruits, vegetables, meat, algae, and seaweed. Avoid saltwater fish, processed foods, and avocado, which can be harmful. A varied diet helps keep hermit crabs healthy.