Can you eat a crab that has been dead for 5 hours?
Generally speaking, whether a crab that has been dead for five hours is still edible depends on specific factors such as the environment in which the crab died and its condition at the time of death. If any physical discomfort occurs after consumption, prompt medical attention is recommended. Detailed analysis is as follows:

If the crab was immediately stored in a refrigerated environment at 0–4°C after death and was originally healthy with a hard shell and plump, firm legs, it may still be safe to eat after five hours. Under these conditions, bacterial growth is slowed. If inspection shows no foul odor from the shell, firm and elastic flesh, and gills that are white or light yellow in color, the risk of consumption can be reduced by thoroughly cooking the crab until the shell turns red and the meat is completely cooked through.
If the crab died under room temperature conditions for five hours, or showed signs of weakness before death—such as a soft shell or reduced vitality—it should not be consumed. At room temperature, bacteria multiply rapidly inside the crab and may produce toxins that are difficult to destroy even through heating. Even if there are no obvious visual abnormalities, eating such crabs may cause nausea, vomiting, or other discomfort. Crabs with blackened gills, mushy meat, or a strong fishy odor should be discarded immediately.
When purchasing crabs, choose live specimens whenever possible. After bringing them home, rinse the shells with clean water, place them in a ventilated container, keep them in a cool location, and periodically sprinkle water to maintain moisture. Check their vitality again before cooking. For live crabs, remove the internal organs and gills before cooking, ensure even high-temperature cooking, and avoid undercooking to guarantee food safety from the source.