How Is Gastritis Diagnosed: Endoscopy, Biopsies & More

Gastritis is diagnosed through a combination of methods, but the gold standard is an upper endoscopy with biopsy. No blood test or imaging scan alone can confirm gastritis with certainty. Your doctor’s approach will depend on your symptoms, age, risk factors, and whether the goal is to identify the cause or rule out something more serious.

Because gastritis symptoms (burning stomach pain, nausea, bloating) overlap almost entirely with peptic ulcers and functional dyspepsia, research confirms that symptoms and medical history alone cannot reliably distinguish between these conditions. That’s why testing matters.

Endoscopy and Biopsy: The Gold Standard

An upper endoscopy (also called an EGD) is the most definitive way to diagnose gastritis. During the procedure, a thin, flexible tube with a camera is passed through your mouth and into your stomach. The doctor looks for visible signs like redness, swelling, and small breaks in the stomach lining called erosions. But what the stomach looks like on camera only tells part of the story.

The real diagnostic power comes from biopsies, tiny tissue samples taken during the endoscopy. Under a microscope, a pathologist can see exactly what type of inflammation is present. Chronic gastritis shows a buildup of specific immune cells in the tissue. Active gastritis shows a different pattern of white blood cells infiltrating the glands of the stomach lining. The biopsy can also reveal whether inflammation has progressed to more advanced changes like atrophy (thinning of the stomach lining) or intestinal metaplasia, where stomach cells start to resemble intestinal cells. In one large biopsy study, about 2.3% of cases showed intestinal metaplasia, a change that warrants monitoring.

Pathologists grade these findings using a standardized system called the Updated Sydney System, which scores inflammation, activity, atrophy, intestinal metaplasia, and the density of H. pylori bacteria. This scoring helps doctors compare biopsies over time and decide how closely to follow you. Not everyone with gastritis symptoms needs an endoscopy right away, but it becomes important when symptoms don’t respond to initial treatment, when you’re over 60, or when there are warning signs like unexplained weight loss or difficulty swallowing.

Testing for H. pylori

H. pylori bacteria are the most common cause of gastritis worldwide, so testing for this infection is a central part of diagnosis. There are several ways to check, and they fall into two categories: tests that require an endoscopy and tests that don’t.

Non-Invasive Tests

The three main options are blood antibody tests (serology), the urea breath test, and the stool antigen test. Each has trade-offs. A study comparing all three against biopsy results found that blood antibody testing had the highest sensitivity at 94%, meaning it catches the most true infections. The urea breath test and stool antigen test were significantly lower, at 64% and 61% respectively. However, blood tests can stay positive long after an infection has cleared, so they’re better for initial screening than for confirming that treatment worked.

The breath test works by having you swallow a small amount of labeled urea. If H. pylori is present in your stomach, the bacteria break down the urea, and you exhale a detectable byproduct. The stool antigen test looks for H. pylori proteins directly in a stool sample. Both are useful for confirming that the bacteria have been eliminated after treatment.

What to Stop Before Testing

If you take a proton pump inhibitor (omeprazole, pantoprazole, or similar acid-reducing medication), you need to stop it at least two weeks before H. pylori testing. If you’ve recently taken antibiotics for any reason, wait at least four weeks. Both types of medication can suppress H. pylori enough to produce a false negative result, making it look like the bacteria aren’t there when they actually are. These timing rules apply to breath tests, stool tests, and even biopsy-based testing during endoscopy.

Biopsy-Based H. pylori Detection

When an endoscopy is performed, biopsies can be examined under the microscope for H. pylori directly. If the standard staining doesn’t reveal bacteria but the tissue looks suspicious (significant inflammation, intestinal metaplasia), special immunohistochemical stains can detect H. pylori and related species that are harder to spot. This makes biopsy the most thorough method for identifying the infection.

Blood Tests for Autoimmune Gastritis

Autoimmune gastritis is a distinct form where your immune system attacks the acid-producing cells of the stomach. It’s diagnosed differently from the more common H. pylori-driven gastritis. The key blood markers are parietal cell antibodies, which target a specific enzyme in the stomach’s acid-producing cells. These antibodies are found in about 80% of people with autoimmune atrophic gastritis and in 85 to 90% of those who have progressed to pernicious anemia, a condition where vitamin B12 can no longer be absorbed properly.

The accuracy of this blood test depends on the method used. Newer laboratory techniques using purified versions of the target enzyme consistently reach 100% sensitivity, meaning they catch virtually every case. Older methods that rely on tissue slides under a microscope are slightly less reliable, occasionally missing cases. If your doctor suspects autoimmune gastritis, they’ll typically also check your vitamin B12 levels, complete blood count, and possibly intrinsic factor antibodies.

Blood Markers for Atrophic Gastritis

For chronic atrophic gastritis specifically, doctors can use a blood panel that measures pepsinogen levels and a hormone called gastrin-17. Pepsinogen is a substance produced by the stomach lining, and as the lining thins from long-term inflammation, the ratio between two types of pepsinogen shifts in a predictable way. Gastrin-17 levels rise as the stomach loses its ability to produce acid normally.

When these markers are combined, they can detect atrophic gastritis with a sensitivity of about 65% and specificity of about 73%. For more advanced atrophic changes, the accuracy improves, reaching around 83% specificity. These numbers aren’t high enough to replace endoscopy, but the blood panel can serve as a screening tool to identify people who should go on to have a scope. This is especially useful in populations where endoscopy isn’t readily available or as an initial step before deciding whether a more invasive procedure is warranted.

How Gastritis Is Told Apart From Similar Conditions

Gastritis, peptic ulcers, and functional dyspepsia can all cause upper abdominal pain, nausea, and a feeling of fullness after eating. Peptic ulcers involve a visible crater or break in the stomach or duodenal lining, which shows up clearly on endoscopy. Gastritis involves widespread inflammation without that distinct crater. Functional dyspepsia produces the same symptoms but with no visible inflammation or structural changes at all.

Because symptoms alone can’t separate these conditions, the diagnostic pathway often starts with a “test and treat” approach for H. pylori if you’re younger and have no alarm symptoms. If that doesn’t resolve things, or if you have risk factors for more serious disease, endoscopy with biopsy provides the definitive answer. The American College of Gastroenterology recommends H. pylori testing, treatment, and confirmation of eradication for anyone found to have precancerous stomach changes, and surveillance endoscopy every three years for those at high risk of progression.