The main purpose of the kidneys is to make urine by filtering harmful chemicals called toxins out of the blood. The kidneys also help keep necessary chemical substances in the blood, such as salt, proteins, and sugars.