Electrolytes are essential minerals in your body—like sodium, potassium, and magnesium—that have an electrical charge. They maintain your body’s fluid balance, as well as the normal functioning of cells—especially your heart, muscle, and nerve cells.