Electrolytes are minerals in the body that carry an electric charge and perform vital functions such as regulating fluid balance, acid-base balance, and nerve and muscle activity. The main electrolytes include sodium, potassium, chloride, and magnesium.