Gastric Acid: Function, Production, and Imbalances

Gastric acid is a potent hydrochloric acid solution secreted by specialized cells in the stomach lining, typically reaching a pH between 1 and 2 when the stomach is empty. It serves as both a chemical engine for digestion and a frontline barrier against swallowed pathogens. But the story of stomach acid is more nuanced than “acid breaks down food,” involving a tightly choreographed system of hormones, nerves, and protective mechanisms that can go wrong in several distinct ways.

How the Stomach Produces Acid

The cells responsible for making hydrochloric acid are called parietal cells, and they are concentrated in the upper and middle portions of the stomach (the fundus and body). Inside each parietal cell sits a specialized enzyme known as the proton pump, which swaps hydrogen ions from inside the cell for potassium ions outside it. Those hydrogen ions then combine with chloride ions in the stomach’s interior to form hydrochloric acid.1PubMed Central. The Physiology of the Gastric Parietal Cell When acid production ramps up, tiny internal compartments within the parietal cell fuse with its surface membrane, delivering more proton pumps to the front line. When secretion slows, those pumps get pulled back inside. This recycling process makes the parietal cell one of the most dynamic examples of membrane remodeling in the human body.

The proton pump itself turns out to be surprisingly versatile. Under certain conditions it can also handle sodium and calcium transport, essentially moonlighting as a different type of pump depending on the cell’s internal chemistry and pH.2PubMed Central. The parietal cell gastric H, K-ATPase also functions as the Na, K-ATPase and Ca-ATPase in altered states This flexibility matters because the proton pump is also the target of some of the most widely prescribed drugs in the world, a point we will return to.

What Tells the Stomach to Start Secreting

Acid secretion does not happen in a single on-off switch. Three chemical messengers converge on the parietal cell: the hormone gastrin, the local signaling molecule histamine, and the neurotransmitter acetylcholine. Research using real-time measurement of acid and histamine output in animal models has clarified how these three work together. Under resting conditions, gastrin appears to be the main driver, directly activating parietal cells rather than working solely through histamine release. When the nervous system adds acetylcholine to the mix (as happens when you see, smell, or chew food), acid output climbs further, but the gastrin and histamine contributions stay roughly the same, suggesting acetylcholine acts on parietal cells without much effect on the cells that release gastrin or histamine.3PubMed. Simultaneous detection of gastric acid and histamine release to unravel the regulation of acid secretion from the guinea pig stomach

Acid secretion unfolds in phases. The cephalic phase starts before food even reaches the stomach, triggered by the sight and smell of a meal via the vagus nerve. The gastric phase kicks in when food physically stretches the stomach wall and proteins stimulate gastrin release. A third, intestinal phase occurs when nutrients reach the upper small intestine. Inhibitory signals exist too: peptide YY, a gut hormone, can suppress the cephalic and gastric phases in a dose-dependent manner, acting as a brake once enough acid has been produced.4PubMed. Effect of peptide YY on cephalic, gastric, and intestinal phases of gastric acid secretion and on the release of gastrointestinal hormones

There is also a time-of-day pattern. Studies measuring acid output around the clock have found a statistically significant circadian rhythm, with the highest rates of unstimulated acid secretion occurring in the evening and the lowest in the early morning hours. This rhythm does not appear to depend on circadian changes in circulating gastrin levels, suggesting other biological clock mechanisms are at work.5PubMed. Circadian rhythm of gastric acid secretion in men with active duodenal ulcer The practical upshot is that heartburn and ulcer symptoms tend to flare at night, which aligns neatly with this evening peak in acid production.

Digestion and Nutrient Absorption

The most obvious job of gastric acid is breaking down food. The acid unfolds (denatures) proteins, exposing them to the digestive enzyme pepsin, which itself only works in an acidic environment. Without adequate acid, protein digestion stalls in the stomach and shifts downstream to the small intestine, which is less efficient at handling large intact protein fragments.

Less intuitively, gastric acid is essential for absorbing several micronutrients. Acid is required to release vitamin B12 from the food proteins it is bound to, and it is necessary for the proper absorption of iron, calcium, and likely magnesium. It also plays a role in the absorption, secretion, and activation of vitamin C.6PubMed Central. Common Pitfalls in the Management of Patients with Micronutrient Deficiency: Keep in Mind the Stomach This is why people who chronically produce too little acid, or who take acid-suppressing drugs for extended periods, can develop deficiencies in these nutrients even when their dietary intake seems adequate.

The Acid Barrier Against Infection

Your stomach doubles as a sterilization chamber. At a pH of 1 to 2, gastric fluid is lethal to many bacteria, viruses, and parasites that hitch a ride on food and water.7PubMed. The role of gastric acid in preventing foodborne disease and how bacteria overcome acid conditions Classic experiments demonstrated how effective this barrier is: in a normal stomach, virtually all test bacteria were killed within 30 minutes, while in a stomach without acid (achlorhydric), there was no reduction in bacterial counts even after a full hour. The killing effect was almost entirely dependent on pH; at a pH below 4, over 99.9% of bacteria were destroyed within half an hour.8PubMed Central. Gastric acid barrier to ingested microorganisms in man: studies in vivo and in vitro

Some pathogens have evolved ways to survive the acid bath. Certain enteric bacteria mount stress responses that let them tolerate the hydrogen ions in the stomach long enough to reach the more hospitable small intestine, where a different mix of acids and other conditions awaits.9PubMed. Breaking through the acid barrier: an orchestrated response to proton stress by enteric bacteria Anything that raises stomach pH, whether a disease, a drug, or even a large buffering meal, temporarily weakens this defense and can increase your susceptibility to foodborne and waterborne infections.

Why the Stomach Doesn’t Digest Itself

An acid strong enough to dissolve metal and kill bacteria could easily damage the stomach’s own lining, and yet it usually doesn’t. The stomach deploys a multilayered defense: a thick mucus layer that physically separates acid from the underlying tissue, a constant secretion of bicarbonate that neutralizes acid at the mucosal surface, brisk blood flow that whisks away any acid that does penetrate, and rapid cell turnover that replaces damaged surface cells every few days.

Prostaglandins, a family of signaling molecules produced locally in the stomach, coordinate virtually every aspect of this defense. They stimulate mucus and bicarbonate secretion, regulate mucosal blood flow, and can even inhibit acid secretion when needed.10PubMed. Role of endogenous prostaglandins in gastric secretion and mucosal defense This is exactly why nonsteroidal anti-inflammatory drugs (NSAIDs) like aspirin and ibuprofen can cause stomach ulcers: they block prostaglandin production, which strips away the stomach’s self-protection. The increased susceptibility to injury after taking an NSAID is one of the strongest demonstrations of how important prostaglandins are to mucosal defense.11PubMed. Prostaglandins, NSAIDs, and gastric mucosal protection: why doesn’t the stomach digest itself?

Too Much Acid

When the balance tips toward excess acid, the consequences range from chronic heartburn to life-threatening ulcers. Gastroesophageal reflux disease (GERD) is the most common expression. When the muscular valve between the esophagus and the stomach fails to close properly, acid washes upward into tissue that lacks the stomach’s protective armor.12PubMed Central. Neuro-regulation of lower esophageal sphincter function as treatment for gastroesophageal reflux disease The burning sensation of heartburn is literally acid injuring esophageal cells.

A more dramatic example of acid overproduction is Zollinger-Ellison syndrome, caused by tumors called gastrinomas that pump out enormous quantities of gastrin. The resulting flood of acid leads to severe reflux, stubborn peptic ulcers, and chronic diarrhea. Gastrin levels above 1,000 pg/mL alongside a gastric pH below 2 are considered diagnostic.13PubMed Central. Gastrinoma and Zollinger Ellison syndrome: A roadmap for the management between new and old therapies These tumors most often arise in the pancreas or duodenum, within a region surgeons call the “gastrinoma triangle.”14Radiology Case Reports. Zollinger-Ellison syndrome: Revelation of the gastrinoma triangle

The Helicobacter pylori Complication

H. pylori infection, which colonizes roughly half the world’s population, has a paradoxical relationship with acid. When the infection concentrates in the antrum (the lower part of the stomach), it drives up gastrin release and suppresses somatostatin, boosting acid output and predisposing people to duodenal ulcers. But when the infection spreads to the body of the stomach, the resulting inflammation actually suppresses parietal cells and leads to lower acid production, which over the long term is associated with a higher risk of gastric cancer.15Gastroenterology. How Does Helicobacter pylori Cause Mucosal Damage? Its Effect on Acid and Gastrin Physiology In other words, the same bacterium can push acid levels in opposite directions depending on where it settles and how the host’s immune system responds. This helps explain why H. pylori is linked to both ulcer disease and cancer despite those conditions arising from opposite acid environments.16PubMed Central. Helicobacter pylori and gastric acid: an intimate and reciprocal relationship

Interestingly, successfully eradicating H. pylori with antibiotics can lead to a rebound increase in acid secretion. In people whose parietal cells were being suppressed by the infection, clearing the bacteria allows a rapid upregulation of proton pumps, even before the total number of parietal cells increases.17PubMed Central. Mechanisms of increased acid secretion after eradication of Helicobacter pylori infection This can sometimes trigger new symptoms of reflux or heartburn in someone who never had them before treatment.

Too Little Acid

Low acid production (hypochlorhydria) or absent acid production (achlorhydria) gets far less public attention than acid excess, but it carries its own set of problems. The most clear-cut cause is autoimmune atrophic gastritis, in which the immune system attacks and destroys parietal cells. Because the damage is irreversible, acid secretion declines permanently, leading to impaired nutrient absorption and, over time, an increased risk of certain gastric precancerous conditions.18PubMed Central. Autoimmune Gastritis and Hypochlorhydria: Known Concepts from a New Perspective The classic downstream consequence of this disease is pernicious anemia, a B12 deficiency severe enough to cause neurological symptoms.

Low stomach acid also compromises the gastric barrier, which can allow abnormally large numbers of bacteria to colonize the upper small intestine, a condition known as small intestinal bacterial overgrowth (SIBO). This is particularly relevant in developing countries, where underproduction of hydrochloric acid is common and may contribute to malnutrition by letting bacteria compete for nutrients right where absorption takes place.19PubMed Central. Hunger and microbiology: is a low gastric acid-induced bacterial overgrowth in the small intestine a contributor to malnutrition in developing countries? Long-term use of proton pump inhibitors can also produce drug-induced SIBO through the same mechanism of reduced acid.20PubMed Central. Treatment of Small Intestinal Bacterial Overgrowth (SIBO) in Gastrointestinal, Hepatic, Endocrine, Neurological, and Postoperative Diseases

Measuring Gastric Acid in Practice

Despite how central acid is to so many gastrointestinal conditions, directly measuring it has largely fallen out of routine clinical practice. The traditional gold standard involves placing a tube into the stomach and collecting fluid under resting conditions and again after an injection that maximally stimulates acid output. That test gives precise numbers but is uncomfortable for the patient and time-consuming, so it is rarely performed today outside specialized research settings. Instead, clinicians often rely on non-invasive proxies. Blood levels of pepsinogens, enzymes secreted alongside acid, correlate with the state of the gastric lining and are supported by international guidelines as a screening approach for chronic atrophic gastritis and low acid states.21PubMed Central. Non-invasive method for the assessment of gastric acid secretion In most everyday scenarios, though, doctors treat acid-related symptoms empirically and gauge results from the response to therapy rather than from a formal acid measurement.

Drugs That Turn Down Acid

Two major classes of acid-suppressing drugs have dominated treatment for decades. Histamine-2 receptor antagonists (H2 blockers, such as famotidine) competitively block one of the three signals that stimulate the parietal cell, producing a moderate and relatively short-lived drop in acid. Proton pump inhibitors (PPIs, such as omeprazole and lansoprazole) take a more aggressive approach, permanently disabling proton pumps by binding to them irreversibly. Because the cell has to manufacture new pumps to resume secretion, PPIs produce a longer and more powerful acid reduction.22PubMed Central. Comparison of the Safety of Proton Pump Inhibitors and Histamine Type 2-Receptor Antagonists in the Prevention of Gastrointestinal Complications

A newer class, potassium-competitive acid blockers (P-CABs), takes yet another approach. These drugs bind to the potassium-binding site on the proton pump, blocking it reversibly and with a fast onset of action.23PubMed Central. Potassium-competitive acid blockers – are they the next generation of proton pump inhibitors? Vonoprazan, the first P-CAB to reach the market (initially in Japan in 2015), inhibits the proton pump with a potency roughly 350 times greater than lansoprazole, one of the older PPIs.24PubMed. The First-in-Class Potassium-Competitive Acid Blocker, Vonoprazan Fumarate: Pharmacokinetic and Pharmacodynamic Considerations Because the binding is reversible, acid secretion can resume more quickly once the drug is stopped, which may help avoid some of the rebound issues associated with PPIs. P-CABs also reach full effect from the first dose, unlike PPIs which take several days to achieve maximal suppression.25PubMed Central. Potent Potassium-competitive Acid Blockers: A New Era for the Treatment of Acid-related Diseases

Consequences of Long-Term Acid Suppression

PPIs are among the most prescribed medications worldwide, and for many people they are genuinely life-improving. But the question of what happens when you suppress acid for years, not weeks, has generated real concern. One area of investigation involves bone health. By raising gastric pH, PPIs impair the ionization and absorption of calcium salts, reducing the calcium available for bone formation. There is also evidence that prolonged PPI use may trigger secondary changes in parathyroid hormone and affect bone-specific enzymes.26PubMed Central. Impact of Proton Pump Inhibitor Therapy on Bone Mineral Density: An Updated Systematic Review Umbrella reviews pooling multiple meta-analyses have found associations between PPI use and changes in bone mineral density across various skeletal sites, though the clinical significance of those changes remains debated. PPI-related low magnesium levels, which can independently affect bone, have also been flagged.27Bone Reports. Osseous implications of proton pump inhibitor therapy: An umbrella review The exact mechanisms behind potential PPI-related bone damage are still not fully worked out, but impaired micronutrient absorption and elevated gastrin from the feedback loop of chronic acid suppression likely play a role.28PubMed Central. Proton Pump Inhibitors and Fractures in Adults: A Critical Appraisal and Review of the Literature

Another practical concern is rebound acid hypersecretion. When you stop a PPI after weeks or months of use, the stomach can temporarily overshoot its normal acid output, producing more acid than it did before you ever started the drug. This happens because the body compensates for chronic acid suppression by increasing gastrin levels and parietal cell mass, so removing the brake leads to a surge. Studies have shown that stimulated acid secretion after PPI discontinuation can be significantly higher than it was before treatment began.29PubMed Central. Rebound Acid Hypersecretion after Withdrawal of Long-Term Proton Pump Inhibitor (PPI) Treatment-Are PPIs Addictive? The rebound can cause a wave of heartburn and reflux symptoms that feel worse than the original problem, which sometimes drives people to restart the medication, creating a cycle that has led some researchers to ask whether PPIs are, in a functional sense, habit-forming. Tapering the dose gradually rather than stopping abruptly can help minimize this effect.

Stomach Acidity Across the Animal Kingdom

Human stomach acid is powerful, but it is not the most extreme. A comparative study of stomach acidity across mammals and birds found that diet strongly predicts how acidic a species’ stomach is. Scavengers, which routinely eat decaying carcasses teeming with bacteria, have the most acidic stomachs. Carnivores that hunt live prey come next. Herbivores generally have the least acidic stomachs, and carnivores that specialize in evolutionarily distant prey like insects or fish fall somewhere in between.30PubMed Central. The Evolution of Stomach Acidity and Its Relevance to the Human Microbiome Human stomach acidity, interestingly, falls closer to that of scavengers and carrion feeders than to that of other omnivores. One interpretation is that high acidity evolved partly as a defense against the diverse and potentially dangerous microbial communities our ancestors encountered as their diets broadened. This finding also has modern implications: if the acid barrier evolved to shape which microbes survive passage into the gut, then chronically suppressing acid with medications could alter the gut microbiome in ways we are only beginning to map.

How Gastric Acid Was Identified

It took centuries for scientists to even agree that the stomach makes acid. The discovery unfolded in four broad phases: first, the recognition that stomach contents could be acidic; second, a prolonged debate over whether that acidity came from the stomach itself or from fermentation of food; third, the qualitative identification of the acid as hydrochloric acid; and finally, the development of techniques to measure acid output quantitatively, giving rise to modern clinical tests of basal and stimulated acid secretion.31Gastroenterology. The Discovery of Gastric Acid The fermentation debate is particularly striking in hindsight. For a long time, reputable scientists argued that the sourness in the stomach was simply food going bad, not a deliberate secretion. It was not until careful experiments isolated gastric juice from an empty stomach and showed it was acidic on its own that the question was settled. Modern gastroenterology is built on that foundation, though, as noted earlier, direct acid measurement has largely given way to indirect markers in everyday clinical practice.