Porcupine fish eat snails, crabs and sea urchins. They are nocturnal hunters that seek out their prey near sandy flats, rocky shorelines and coral reefs.
The porcupine fish has a robust jaw, and its mouth is hard and beak-like. These features help the fish in cracking open the hard external skeletons of their prey. In regards to their own place on the food chain, porcupine fish are the prey of sharks and dolphins. When threatened, the porcupine fish will discourage attacks by gulping water to inflate it's body and send hard spines protruding from all over its body. At all other times, their spines will lie flat.