Major electrolytes inside and outside cells like sodium, potassium, chloride, and bicarbonate help regulate the body's acid-base balance. Electrolytes move between cells and extracellular fluid as needed to maintain pH levels in a narrow range, preventing acidosis or alkalosis which can disrupt cellular functions and physiology. Imbalances can occur due to kidney diseases, diarrhea, vomiting, medications, and other conditions.