No, not all crocodiles can live in salt water. While some crocodile species, such as the saltwater crocodile (Crocodylus porosus) and the American crocodile (Crocodylus acutus), are well adapted to living in both saltwater and freshwater environments, other crocodile species are restricted to freshwater habitats.
For example, the freshwater crocodile (Crocodylus johnstoni) and the Orinoco crocodile (Crocodylus intermedius) are found only in freshwater rivers, lakes, and swamps. These species are not adapted to the high salt content of saltwater environments and would not survive if they were to venture into the ocean.