Sodium bicarbonate , also known as baking soda, is used to relieve heartburn, sour stomach, or acid indigestion by neutralizing excess stomach acid. When used for this purpose, it is said to belong to the group of medicines called antacids. It may be used to treat the symptoms of stomach or duodenal ulcers.