Many personal care and pharmacy products contain a mixture of citric acid and sodium bicarbonate. While sodium bicarbonate is technically an acidic salt, it acts as a base in the presence of citric acid. The two compounds react with one another to produce bubbles, leading to an effervescent solution when they're mixed with water.
Sodium bicarbonate is an acidic salt with the chemical formula NaHCO3. Salts are chemical compounds made up of one or more positively charged particles and one or more negatively charged particles; the particles are attracted to one another because of the opposite charges, but in water they separate from one another and react independently. Depending on what else is present in solution, sodium bicarbonate can either act as an acid or as a base, explain Drs. Reginald Garrett and Charles Grisham in their book "Biochemistry."
Citric acid is ubiquitous in nature and has major biochemical significance in the human body, but you don't need to consume it. Your cells make it when you burn carbohydrates, proteins, and fats for energy. The cells then break down the citric acid they've made to generate the energy molecule ATP -- adenosine triphosphate -- and the waste products carbon dioxide and water. Citric acid is common in foods as a preservative and flavoring agent.
Some dry products like antacid tablets, indigestion tablets and bath drop-ins contain both sodium bicarbonate and citric acid. When these compounds are dry, they don't react with one another. Mixed with water, however, the sodium and bicarbonate separate from one another and the bicarbonate reacts with the citric acid. This produces a compound called carbonic acid, with the chemical formula H2CO3. Carbonic acid is unstable and falls apart, making water and carbon dioxide, which produces bubbles in the solution.
The citric acid in effervescent pharmaceutical products is of virtually no nutritional value, since you excrete most of the citric acid you consume via the urine. As long as there's more bicarbonate than citric acid present, the bicarbonate can react with other acids -- like stomach acid -- and help relieve symptoms of heartburn, explains MayoClinic.com. The reason you'll find citric acid in heartburn and indigestion tablets is that the effervescence helps to mask the bitter flavor of ingredients such as aspirin.