Ghost crabs dig deep burrows near the intertidal zone of open sandy beaches.
The burrows are usually composed of a long shaft with a chamber at the end, occasionally with a second entrance shaft.
They are semi-terrestrial and breathe oxygen from the air through moistened gills.
They must periodically wet their gills with seawater, usually by taking water from moist sand or by running into the surf and letting the waves wash over them.
However, they can only remain under water for a limited amount of time, as they will drown.

Ghost crabs are generalists, scavenging carrion and debris, as well as preying on small animals, including sea turtle eggs and hatchlings, clams, and other crabs.
They are predominantly nocturnal.
They remain in their burrows during the hottest part of the day, and throughout the coldest part of the winter.

Ghost crabs are swift runners, darting away at the slightest sign of danger.
They either head back to their burrows or plunge into the sea to escape intruders.
The gaits of ghost crabs alter as their speed increases.
Observations on O. ceratophthalma show it can walk indefinitely using all four pairs of walking legs, occasionally alternating which side leads.
At higher speeds, the fourth pair of legs is raised off the ground, and at the highest speeds, the crab runs, using only the first and second pairs of walking legs.

Ghost crabs also have the ability to change colors to match their surroundings by adjusting the concentration and dispersal of pigments within their chromatophores.
They can even match the specific colors of the grains of sand in their habitats.
However, unlike metachrosis (which is a rapid change of colors), ghost crabs are only capable of morphological color change, which occurs over a longer span of time.

In a study in 1964, individuals of O. ceratophthalma in Hawaii from two populations (one from a black-sand beach and the other from a white-sand beach) were observed to markedly differ in pigmentation although they remain morphologically indistinguishable.
Specimens taken from the black-sand beach were much darker than the specimens taken from the white-sand beach, exhibiting nearly 12 times as many black chromatophores.
When the black-sand specimens were subsequently exposed to a white background, they were observed to gradually become lighter over the course of about a month.
The opposite happened to white-sand specimens when placed in black backgrounds.

In a 2013 study in Singapore, Ocypode ceratophthalma  was also discovered to change color in response to the time of day.
In a span of 24 hours, they were observed to alternate between lighter and darker coloration, being lightest at midday and darkest at night.
However, when placed in a dark background, the crabs showed no significant changes in coloration.
This suggests, at least for short-term color changes, they follow a day-night cycle to determine body coloration; basing it on their biological clocks rather than on the brightness or darkness of their environments.
The researchers believe relying on the time of day rather than ambient light is more advantageous for survival in ghost crabs.
It lets ghost crabs avoid changing color when in temporary shadow (for example within their burrows) and thus still remain inconspicuous when they are once again illuminated by daylight.
However, this behavior is only exhibited by juveniles.

Ghost crabs lay their eggs in the sea, which develop into planktonic marine larvae.
Ghost crabs dig deep burrows near the intertidal zone of open sandy beaches. The burrows are usually composed of a long shaft with a chamber at the end, occasionally with a second entrance shaft. They are semi-terrestrial and breathe oxygen from the air through moistened gills. They must periodically wet their gills with seawater, usually by taking water from moist sand or by running into the surf and letting the waves wash over them. However, they can only remain under water for a limited amount of time, as they will drown.
Ghost crabs are generalists, scavenging carrion and debris, as well as preying on small animals, including sea turtle eggs and hatchlings, clams, and other crabs. They are predominantly nocturnal. They remain in their burrows during the hottest part of the day, and throughout the coldest part of the winter.
Ghost crabs are swift runners, darting away at the slightest sign of danger. They either head back to their burrows or plunge into the sea to escape intruders. The gaits of ghost crabs alter as their speed increases. Observations on O. ceratophthalma show it can walk indefinitely using all four pairs of walking legs, occasionally alternating which side leads. At higher speeds, the fourth pair of legs is raised off the ground, and at the highest speeds, the crab runs, using only the first and second pairs of walking legs.
Ghost crabs also have the ability to change colors to match their surroundings by adjusting the concentration and dispersal of pigments within their chromatophores. They can even match the specific colors of the grains of sand in their habitats. However, unlike metachrosis (which is a rapid change of colors), ghost crabs are only capable of morphological color change, which occurs over a longer span of time.
In a study in 1964, individuals of O. ceratophthalma in Hawaii from two populations (one from a black-sand beach and the other from a white-sand beach) were observed to markedly differ in pigmentation although they remain morphologically indistinguishable. Specimens taken from the black-sand beach were much darker than the specimens taken from the white-sand beach, exhibiting nearly 12 times as many black chromatophores. When the black-sand specimens were subsequently exposed to a white background, they were observed to gradually become lighter over the course of about a month. The opposite happened to white-sand specimens when placed in black backgrounds.
In a 2013 study in Singapore, Ocypode ceratophthalma  was also discovered to change color in response to the time of day. In a span of 24 hours, they were observed to alternate between lighter and darker coloration, being lightest at midday and darkest at night. However, when placed in a dark background, the crabs showed no significant changes in coloration. This suggests, at least for short-term color changes, they follow a day-night cycle to determine body coloration; basing it on their biological clocks rather than on the brightness or darkness of their environments. The researchers believe relying on the time of day rather than ambient light is more advantageous for survival in ghost crabs. It lets ghost crabs avoid changing color when in temporary shadow (for example within their burrows) and thus still remain inconspicuous when they are once again illuminated by daylight. However, this behavior is only exhibited by juveniles.
Ghost crabs lay their eggs in the sea, which develop into planktonic marine larvae.
Ghost crab