Ocean or marine hermit crabs are omnivorous and consume both plant and animal matter. They are opportunistic scavengers rather than hunters and prefer to eat algae and dead animals. In captivity, marine hermits function as tank cleaners by eating leftover food and detritus from the tank floor.
As hermit crabs get older and larger, they require larger amounts of food to sustain themselves. Young, small crabs are able to survive on leftovers from the rest of the tank and the occasional spirulina algae tablet, while larger crabs need dedicated hermit crab pellet food and a steady diet of fresh vegetables and fish.