Finding the Cause: Diagnosis and Endoscopy
At a Glance
Peptic ulcer disease is evaluated with H. pylori breath or stool testing and, when needed, an upper endoscopy. Endoscopy can locate the ulcer, take biopsies from stomach ulcers, assess bleeding risk, and guide follow-up.
To confirm that you have a peptic ulcer and find its exact cause, your doctor will evaluate your symptoms and medical history. For many younger patients with uncomplicated symptoms, doctors may use non-invasive breath or stool tests to check for H. pylori and start treatment right away. However, if you are older, have “alarm” symptoms like bleeding or weight loss, or your pain isn’t going away, an upper endoscopy (also called an EGD) is considered the definitive diagnostic test [1][2].
The Role of Endoscopy
During an endoscopy, a thin, flexible tube with a camera is passed through your mouth while you are sedated. This allows your gastroenterologist to:
- Directly Visualize: Symptoms alone cannot prove an ulcer exists. The camera lets the doctor see the exact size, location, and severity of any mucosal damage [3][2].
- Stop Bleeding: If an ulcer is actively bleeding, the doctor can use tools through the scope to stop the blood loss immediately [3].
- Assess Bleeding Risk: If you have a bleeding ulcer, the doctor will classify its appearance (often using the Forrest classification system) to predict how likely it is to bleed again. This classification is generally only used for ulcers that have shown signs of bleeding [3].
What to Expect for Your Endoscopy
- Preparation: You will be asked to fast (no food or drink) for several hours before the procedure to ensure your stomach is empty.
- The Procedure: You will receive sedation to keep you comfortable. The procedure itself usually takes only 15 to 30 minutes.
- Recovery: Because of the sedation, you will need an escort to drive you home. You may have a mild sore throat afterward, but serious complications are rare. Pathology results from any biopsies typically take a few days to a week to return.
Why Biopsies are Critical
A biopsy—removing a tiny piece of tissue—is a routine part of an endoscopy.
Gastric (Stomach) Ulcers
Doctors generally take multiple biopsies of gastric ulcers [4]. This is because a small proportion of stomach ulcers can be related to malignancy (cancer). While pathology from the biopsy is highly reassuring, it isn’t infallible. For this reason, doctors often recommend a follow-up endoscopy 8 to 12 weeks later (depending on your specific risk factors) to confirm the gastric ulcer has completely healed [5].
Duodenal (Intestinal) Ulcers
Ulcers in the duodenum are almost never cancerous [6]. Because of this, doctors usually do not need to biopsy the ulcer itself to rule out malignancy, though they will still test the stomach for H. pylori [7][8].
The Challenge of H. pylori Testing
One of the most important parts of your diagnosis is checking for H. pylori bacteria. This can be done during your endoscopy or through non-invasive breath or stool tests [9][10].
However, these tests are highly sensitive to the medications you may already be taking [10][11].
- Proton Pump Inhibitors (PPIs): Common acid blockers like omeprazole or pantoprazole can suppress the bacteria, causing a false-negative result (the test says you don’t have the bacteria even when you do) [10].
- Antibiotics and Bismuth: These can significantly lower the amount of bacteria in your stomach, also leading to false negatives [12][13].
To ensure an accurate result for a planned test, doctors generally prefer you to be off PPIs for 2 weeks, and off antibiotics or bismuth for 4 weeks [10][11].
SAFETY WARNING: Never stop taking prescribed acid blockers, antibiotics, aspirin, or any other medication on your own. If you have an active bleeding ulcer, severe symptoms, or other medical needs, stopping your medication can be dangerous. Always ask your prescribing clinician if and when it is safe to pause these medications for a test.
Your Endoscopy Report Checklist
When you receive your results, ensure the following details are discussed with you:
- Location and Size: Exactly where the ulcer is and how large it is [14].
- H. pylori Status: The method used for testing and the result [9][3].
- Biopsy Results: For gastric ulcers, a clear statement on the pathology findings [4].
- Bleeding Stigmata: If you had a bleeding ulcer, what its appearance was and the risk for re-bleeding [3].
- Follow-up Plan: Clear instructions on when you need a repeat endoscopy or a test-of-cure for H. pylori [3][15].
Common questions in this guide
When is an upper endoscopy needed for a suspected peptic ulcer?
What should I expect during an endoscopy for a peptic ulcer?
Why might a stomach ulcer need a biopsy and repeat endoscopy?
Can my medicines make an H. pylori test falsely negative?
Do duodenal ulcers usually need to be biopsied?
What details should I review in my endoscopy report?
Questions to Ask Your Doctor
Curated prompts to bring to your next appointment.
- 1.What was the exact location and size of the ulcer found during my evaluation?
- 2.If you found a gastric ulcer, did you take biopsies, and what did the pathology report show?
- 3.Was an H. pylori test performed, and if so, what type (like a rapid urease test, breath test, or stool test)?
- 4.I have been taking acid-blocking medication (PPIs) recently; is there a chance my H. pylori test was a false negative?
- 5.Given my specific situation, do I need a follow-up endoscopy to ensure healing, and when should that be scheduled?
Questions For You
Tap a prompt to share your answer — we'll use it plus this page's context to start a tailored conversation.
References
References (15)
- 1
Peptic Ulcer Disease: A Review.
Vakil N
JAMA 2024; (332(21)):1832-1842 doi:10.1001/jama.2024.19094.
PMID: 39466269 - 2
Correlation of Clinical, Endoscopic, and Pathological Findings among Suspected Peptic Ulcer Disease Patients in Abuja, Nigeria.
Okoye OG, Olaomi OO, Nwofor AME, et al.
Gastroenterology research and practice 2021; (2021()):9646932 doi:10.1155/2021/9646932.
PMID: 34306068 - 3
Diagnosis and management of nonvariceal upper gastrointestinal hemorrhage: European Society of Gastrointestinal Endoscopy (ESGE) Guideline.
Gralnek IM, Dumonceau JM, Kuipers EJ, et al.
Endoscopy 2015; (47(10)):a1-46 doi:10.1055/s-0034-1393172.
PMID: 26417980 - 4
Factors Associated with Malignant Gastric Ulcers: A 10-year Retrospective Cohort Study.
Zayad A, Yahia Y, Chandra P, et al.
International journal of general medicine 2026; (19()):593454 doi:10.2147/IJGM.S593454.
PMID: 42238357 - 5
Medical versus surgical treatment for refractory or recurrent peptic ulcer.
Gurusamy KS, Pallari E
The Cochrane database of systematic reviews 2016; (3()):CD011523 doi:10.1002/14651858.CD011523.pub2.
PMID: 27025289 - 6
The Association between Peptic Ulcer Disease and Gastric Cancer: Results from the Stomach Cancer Pooling (StoP) Project Consortium.
Paragomi P, Dabo B, Pelucchi C, et al.
Cancers 2022; (14(19)) doi:10.3390/cancers14194905.
PMID: 36230828 - 7
Closed-Loop Gastric Outlet Obstruction Secondary to Duodenal Ulcer in a Patient With Esophageal Stricture.
Kaur J, Stoukides G, Amaturo M
Cureus 2023; (15(3)):e36507 doi:10.7759/cureus.36507.
PMID: 37090344 - 8
Gastrointestinal Stromal Tumor: GIST Another Duodenal Ulcer.
Harris PS, Romano J, Russ KB, et al.
Ochsner journal 2020; (20(2)):236-238 doi:10.31486/toj.18.0167.
PMID: 32612484 - 9
Advances on diagnosis of Helicobacter pylori infections.
Sousa C, Ferreira R, Santos SB, et al.
Critical reviews in microbiology 2023; (49(6)):671-692 doi:10.1080/1040841X.2022.2125287.
PMID: 36264672 - 10
Diagnosis of Helicobacter pylori Infection in the Proton Pump Inhibitor Era.
Calvet X
Gastroenterology clinics of North America 2015; (44(3)):507-18.
PMID: 26314665 - 11
Joint ESPGHAN/NASPGHAN Guidelines for the Management of Helicobacter pylori in Children and Adolescents (Update 2016).
Jones NL, Koletzko S, Goodman K, et al.
Journal of pediatric gastroenterology and nutrition 2017; (64(6)):991-1003 doi:10.1097/MPG.0000000000001594.
PMID: 28541262 - 12
Diagnosis of Helicobacter pylori using the rapid urease test.
Uotani T, Graham DY
Annals of translational medicine 2015; (3(1)):9 doi:10.3978/j.issn.2305-5839.2014.12.04.
PMID: 25705641 - 13
Diagnosis of Helicobacter pylori by invasive test: histology.
Lee JY, Kim N
Annals of translational medicine 2015; (3(1)):10 doi:10.3978/j.issn.2305-5839.2014.11.03.
PMID: 25705642 - 14
Principles and practice to facilitate complete photodocumentation of the upper gastrointestinal tract: World Endoscopy Organization position statement.
Emura F, Sharma P, Arantes V, et al.
Digestive endoscopy : official journal of the Japan Gastroenterological Endoscopy Society 2020; (32(2)):168-179 doi:10.1111/den.13530.
PMID: 31529547 - 15
Role of routine second-look endoscopy in patients with acute peptic ulcer bleeding: meta-analysis of randomized controlled trials.
Kamal F, Khan MA, Lee-Smith W, et al.
Gastrointestinal endoscopy 2021; (93(6)):1228-1237.e5 doi:10.1016/j.gie.2020.12.039.
PMID: 33417896
This page explains peptic ulcer disease testing, endoscopy, and biopsy for informational purposes only and does not constitute medical advice. Ask your clinician to interpret your results and advise whether any medicine can be paused safely.
Get notified when new evidence is published on peptic ulcer disease.
We monitor PubMed for new peer-reviewed studies on this topic and email a short summary when something meaningful changes.