The diet of the coconut crab mainly consists of coconuts and other fruits, seeds, nuts, and even carrion.