Gastritis is definitively diagnosed through an upper endoscopy with tissue biopsies, not through symptoms alone. While your doctor will start with your medical history and may order blood work or a breath test, the gold standard is examining a small sample of your stomach lining under a microscope. This confirms whether inflammation is present, how severe it is, and what’s causing it.
That said, not everyone with stomach discomfort needs an endoscopy right away. Diagnosis typically follows a stepwise process, starting with the least invasive options and escalating based on what your symptoms and initial test results suggest.
What Happens Before Any Testing
Your doctor will ask about the pattern of your symptoms: burning or gnawing pain in the upper abdomen, nausea, bloating, feeling full quickly, or loss of appetite. They’ll want to know about medications you take regularly, especially anti-inflammatory painkillers like ibuprofen or aspirin, since these are a leading cause of gastritis. Alcohol use, smoking, recent stress, and family history of stomach cancer all factor into the assessment.
Certain warning signs push doctors to move more quickly toward endoscopy. These include unintentional weight loss, difficulty swallowing, signs of bleeding (such as black or tarry stools, or vomiting blood), persistent vomiting, fever, a mass you can feel in your abdomen, or new-onset symptoms at an older age. A family history of esophageal or gastric cancer also raises the urgency. If none of these red flags are present, your doctor will often test for H. pylori infection first before considering endoscopy.
Testing for H. pylori Infection
H. pylori is the most common cause of gastritis worldwide, so testing for this bacterium is usually the first diagnostic step. Three non-invasive options are available.
The urea breath test is the most widely used. You swallow a capsule or liquid containing a tagged form of urea. If H. pylori is in your stomach, the bacteria break down the urea and release carbon dioxide that can be measured in your breath about 15 to 30 minutes later. A large meta-analysis found this test has a sensitivity of roughly 88% and a specificity of about 85%, meaning it catches most infections and rarely gives a false positive.
The stool antigen test detects H. pylori proteins in a stool sample. It performs comparably to the breath test and is often preferred for children or when a breath test isn’t available.
The blood antibody test checks whether your immune system has produced antibodies against H. pylori. The catch is that antibodies can persist for months or years after an infection clears, so a positive result doesn’t necessarily mean you have an active infection. This makes the blood test less useful for confirming current gastritis or verifying that treatment worked.
Medication Restrictions Before Testing
If you’re taking proton pump inhibitors (like omeprazole or pantoprazole), antibiotics, or bismuth-containing products like Pepto-Bismol, you need to stop them at least two weeks before a breath test or stool test. These medications can suppress H. pylori enough to produce a falsely negative result, even when the bacteria are still present. Your doctor will tell you when and how to pause these safely.
Upper Endoscopy and Biopsy
When non-invasive tests are inconclusive, when alarm symptoms are present, or when your doctor suspects a type of gastritis that requires tissue confirmation, the next step is an upper endoscopy. This procedure involves passing a thin, flexible tube with a camera down your throat and into your stomach. You’ll typically be sedated, and the whole process takes about 15 to 20 minutes.
During the procedure, the doctor visually examines your stomach lining. Different types of gastritis can look distinct. Chemical irritation from bile reflux or painkillers often appears as redness or red streaks with areas of visible bleeding. H. pylori gastritis sometimes shows a bumpy, nodular pattern in the lower part of the stomach, though visual appearance alone isn’t reliable enough to confirm the cause. Rarer forms have their own signatures: lymphocytic gastritis can produce small volcanolike mounds with a central crater, while granulomatous gastritis may show cobblestoning, deep ulcers, or narrowing of the stomach’s lower section.
Visual inspection tells part of the story, but biopsy tells the rest. The standardized protocol, known as the Sydney System, calls for tissue samples from five specific locations: two from the antrum (the lower part of the stomach), two from the corpus (the main body), and one from the incisura (the sharp curve between them). Samples from different areas are placed in separate containers so the pathologist can map exactly where the inflammation, damage, or precancerous changes are occurring. This mapping matters because the pattern of involvement points directly to the cause.
A rapid urease test is often performed on one of the biopsy samples right in the procedure room. A small piece of tissue is placed in a solution containing urea. If H. pylori is present, the bacteria produce an enzyme that changes the solution’s color within minutes to hours. This gives a quick answer while the more detailed pathology results take a few days.
Blood Tests and Biomarkers
Blood tests alone can’t diagnose gastritis, but they provide useful supporting evidence, especially for two specific types.
For atrophic gastritis, where the stomach lining has thinned over time and lost some of its acid-producing cells, doctors can measure levels of pepsinogen, a protein made by those cells. There are two forms: pepsinogen I (produced mainly in the stomach body) and pepsinogen II (produced more broadly). When the stomach body atrophies, pepsinogen I drops while pepsinogen II stays relatively stable, so the ratio between them falls. A pepsinogen I level below about 59 micrograms per liter, or a pepsinogen I-to-II ratio below 3.5, suggests significant atrophy with roughly 70 to 83% accuracy. This blood test is used as a screening tool in some countries, particularly in East Asia where stomach cancer rates are high, to flag people who need endoscopy.
For autoimmune gastritis, where the immune system attacks the stomach’s own acid-producing cells, two antibody tests help confirm the diagnosis. Anti-parietal cell antibodies target the cells themselves, while anti-intrinsic factor antibodies target a protein those cells make that’s essential for absorbing vitamin B12. A clinical practice update in 2021 recommended checking both of these when biopsy results are consistent with autoimmune gastritis. Doctors will also look at vitamin B12 levels, since deficiency is a hallmark consequence of this condition, along with a complete blood count to check for the type of anemia that results from B12 depletion.
Conditions That Look Like Gastritis
Several conditions cause nearly identical symptoms, which is one reason diagnosis can’t rely on symptoms alone. Functional dyspepsia produces the same burning, bloating, and early fullness but without visible inflammation on biopsy. Peptic ulcers cause similar pain but involve a distinct crater in the stomach or duodenal lining. Gastroesophageal reflux disease (GERD) overlaps significantly, especially when the burning is higher in the abdomen or chest. Gallbladder disease, gastroparesis (slow stomach emptying), and even heart-related chest pain can mimic gastritis as well.
This is why the stepwise approach matters. Symptoms get you into the diagnostic process, but the combination of H. pylori testing, endoscopic findings, and biopsy results is what separates gastritis from its lookalikes and identifies the specific type you’re dealing with. The type determines the treatment: eradication therapy for H. pylori, stopping an offending medication, or managing an autoimmune process with B12 supplementation and ongoing monitoring.
What the Diagnostic Process Feels Like
If your doctor suspects straightforward H. pylori gastritis without alarm symptoms, you may only need a breath test or stool test at your first visit. If H. pylori is found and treated, you’ll typically repeat the breath or stool test about four weeks after finishing treatment to confirm the bacteria are gone.
If you do need an endoscopy, expect to fast for at least 8 hours beforehand. You’ll receive sedation through an IV, so you won’t feel the procedure, though your throat may be mildly sore afterward. Most people go home the same day and return to normal activities the next. Biopsy results generally come back within a week, giving your doctor the full picture of what type of gastritis you have, how extensive it is, and whether any precancerous changes like intestinal metaplasia are present.
For autoimmune or atrophic gastritis, diagnosis often happens incidentally during endoscopy for other reasons, or after a workup for unexplained anemia or B12 deficiency. These forms tend to develop slowly and may not cause obvious stomach pain, which means they can go undetected for years before the nutritional consequences become apparent.