Fish kidneys, like human kidneys, regulate the ratio of water versus salt within the body. Fish kidneys have a more complicated job, however, as fish live in environments where they are constantly taking in water and salt.
Fish kidneys cope with the demands put upon them in the aquatic environment by working ceaselessly to excrete or absorb water, depending upon the salinity of the water in which they live. The kidneys of freshwater fish produce very dilute urine, as their challenge is to hang on to salt and get rid of excessive water. The kidneys of saltwater fish have the opposite challenge: hanging on to water, while getting rid of salt. Saltwater fish drink large amounts of seawater, and they have special cells in their gills that hinder salt from entering their bodies.