Gastric acid is produced by parietal cells (also called oxyntic cells) in the stomach. Its secretion is a complex and relatively energetically expensive process. Parietal cells contain an extensive secretory network (called canaliculi) from which the gastric acid is secreted into the lumen of the stomach. These cells are part of epithelial fundic glands in the gastric mucosa. The pH of gastric acid is 2 to 3 in the human stomach lumen, the acidity being maintained by the proton pump H+/K+ ATPase. The parietal cell releases bicarbonate into the blood stream in the process, which causes the temporary rise of pH in the blood, known as alkaline tide.

The resulting 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 chief cells of the stomach secrete enzymes for protein breakdown (inactive pepsinogen and renin). Gastric acid activates pepsinogen into pepsinthis enzyme 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