Gastric acid is one of the main secretions of the stomach. It consists mainly of hydrochloric acid and acidifies the stomach content to a pH of 1.5 to 3.5.
Chloride (Cl−) and hydrogen (H+) ions are secreted separately in the stomach fundus region at the top of the stomach by parietal cells of the gastric mucosa into a secretory network called canaliculi before it enters the stomach lumen.
Gastric acid acts as a barrier against microorganisms to prevent infections and is important for the digestion of food. Its low pH denatures proteins and thereby makes them susceptible to degradation by digestive enzymes such as pepsin. The low pH also activates the enzyme precursor pepsinogen into the active enzyme pepsin by self-cleavage. After leaving the stomach, the hydrochloric acid of the chyme is neutralized in the duodenum by sodium bicarbonate.
The highly acidic environment in the stomach lumen causes proteins from food to lose their characteristic folded structure (or denature). This exposes the protein's peptide bonds. The gastric chief cells of the stomach secrete enzymes for protein breakdown (inactive pepsinogen, and in infancy rennin). Hydrochloric acid activates pepsinogen into the enzyme pepsin, which then helps digestion by breaking the bonds linking amino acids, a process known as proteolysis. In addition, many microorganisms have their growth inhibited by such an acidic environment, which is helpful to prevent infection.
The stomach itself is protected from the strong acid by the secretion of a thick mucus layer, and by secretin induced buffering with sodium bicarbonate. Heartburn or peptic ulcers can develop when these mechanisms fail. Drugs of the antihistaminic and proton pump inhibitor classes can inhibit the production of acid in the stomach, and antacids are used to neutralize excessive existing acid.