Esophagogastroduodenoscopy (EGD), commonly known as upper endoscopy, is a medical procedure that allows doctors to examine the inside of the upper digestive system using a thin, flexible tube with a camera. This diagnostic tool helps healthcare providers investigate unexplained symptoms, identify diseases, and even perform certain treatments—all while keeping patients comfortable through sedation.
Introduction: When Should You Consider This Test?
An upper endoscopy becomes necessary when someone experiences symptoms that suggest problems with the upper digestive tract. This includes the esophagus (the tube carrying food from your mouth to your stomach), the stomach itself, and the duodenum (the first part of the small intestine).[1]
You might need this examination if you’re dealing with persistent stomach pain that won’t go away, especially if it comes with warning signs like unexplained weight loss or loss of appetite. Difficulty swallowing food, a sensation that food is stuck behind your breastbone, or persistent heartburn that doesn’t respond to medication are all reasons your doctor might recommend this test.[2]
Other concerning symptoms include bringing food back up (called regurgitation), nausea or vomiting that doesn’t go away, or vomiting blood. If you’ve noticed black, tar-like stools—which can indicate bleeding in the upper digestive system—or if blood tests show you have anemia (low blood count) without a clear explanation, an upper endoscopy can help find the cause.[12]
People with certain medical conditions may need this test even without symptoms. For instance, those with cirrhosis of the liver (severe scarring of the liver) might undergo endoscopy to check for swollen veins in the esophagus that could bleed. Patients with Crohn’s disease or those needing follow-up for previously diagnosed conditions may also require periodic examinations.[3]
The timing of seeking this diagnostic test matters. If you experience sudden, severe symptoms like vomiting blood or passing black stools, you should seek medical attention immediately. For ongoing but less severe symptoms like chronic heartburn or persistent indigestion, scheduling a consultation with your healthcare provider is the appropriate first step.[8]
Classic Diagnostic Methods: How Upper Endoscopy Works
The upper endoscopy procedure is performed by a specialized doctor called a gastroenterologist—a physician trained in diseases of the digestive system. The procedure typically takes place in a hospital, an outpatient surgery center, or a dedicated endoscopy unit in a medical facility.[1]
The core instrument used is an endoscope, a remarkable piece of medical technology. This flexible tube, only about as thick as your little finger, contains a tiny camera and light at its tip. Modern endoscopes use advanced video technology that transmits clear, real-time images to a screen, allowing the doctor to see every detail of your upper digestive tract.[7]
Preparing for the Examination
Preparation is essential for a successful upper endoscopy. The most important requirement is fasting—typically you cannot eat anything for six to eight hours before the procedure. This ensures your stomach is completely empty, which is crucial for two reasons: it provides the clearest view for your doctor, and it prevents the risk of food entering your lungs if you were to vomit during the procedure.[12]
You can usually drink clear liquids like water or broth up to a few hours before the test, but you must follow your doctor’s specific instructions. After a certain point, even water is not allowed. You’ll also need to inform your doctor about all medications you take, particularly blood thinners like aspirin or warfarin, as these may need to be temporarily stopped or adjusted.[2]
During the Procedure
When you arrive for your endoscopy, medical staff will check your vital signs—breathing rate, heart rate, blood pressure, and oxygen levels. These will be monitored throughout the entire procedure for your safety. Small monitoring devices will be attached to your body, connected to machines that track these important measurements.[2]
Before the examination begins, you’ll receive medication through a vein in your arm or hand. This sedation helps you relax and makes you drowsy, though you won’t be completely asleep in most cases. Many patients don’t remember the procedure afterward due to the sedative’s effects. Additionally, the medical team may spray a numbing medication on the back of your throat to prevent gagging when the endoscope is inserted.[1]
A mouth guard is placed to protect both your teeth and the endoscope itself. If you wear dentures, these must be removed before the procedure begins. You’ll then lie on your left side, and the doctor will gently guide the endoscope through your mouth, down your throat, and into your esophagus.[12]
As the endoscope moves down, the doctor will ask you to swallow at certain points, which helps the tube pass smoothly. Don’t worry—you’ll still be able to breathe normally throughout the entire examination. The tube doesn’t block your airway. The doctor may pump a small amount of air through the endoscope to gently expand your digestive tract, making it easier to see the walls clearly.[8]
The gastroenterologist carefully examines the lining of your esophagus, stomach, and duodenum, looking for any abnormalities. If something unusual is spotted, the doctor can insert tiny surgical tools through the endoscope to take small tissue samples, called biopsies. You won’t feel these biopsies being taken. The tissue is then sent to a laboratory where specialists examine it under a microscope to check for disease.[3]
The actual examination typically takes only 5 to 20 minutes, though you should expect to be at the medical facility for a few hours when including preparation and recovery time.[2]
What Conditions Can Be Diagnosed
Upper endoscopy is remarkably accurate at identifying numerous digestive conditions. It can diagnose gastroesophageal reflux disease (GERD), a condition where stomach acid backs up into the esophagus causing heartburn and damage. The test can reveal esophagitis (inflammation of the esophagus), gastritis (inflammation of the stomach lining), and duodenitis (inflammation of the duodenum).[1]
The procedure can detect stomach ulcers—painful sores in the stomach lining—and identify swallowing disorders. It’s also used to diagnose Barrett’s esophagus, a condition where the lining of the esophagus changes due to long-term acid exposure, which requires monitoring because it can increase cancer risk.[10]
Upper endoscopy can identify celiac disease, a condition where eating gluten damages the small intestine, by allowing doctors to take biopsies of the intestinal lining. It can also detect Crohn’s disease, a chronic inflammatory bowel condition, as well as hiatal hernia—a condition where part of the stomach pushes through the diaphragm into the chest.[2]
The test is invaluable for detecting both cancerous and noncancerous tumors, polyps (abnormal growths), and sources of bleeding in the upper digestive tract. In patients with liver cirrhosis, it can identify esophageal varices—swollen, fragile veins in the esophagus that can rupture and cause life-threatening bleeding.[12]
Therapeutic Uses
Beyond diagnosis, upper endoscopy can also treat certain conditions during the same procedure. Doctors can repair holes in the digestive tract, drain abscesses (pockets of infection), and open narrowed passages that make swallowing difficult. They can insert feeding tubes for patients who can’t eat normally, manage bleeding by applying treatments directly to the source, and remove polyps, small tumors, or objects that have been accidentally swallowed.[1]
Diagnostics for Clinical Trial Qualification
When patients are being considered for participation in clinical trials—research studies testing new treatments—upper endoscopy often serves as a standard qualifying procedure. Clinical trials require precise documentation of a patient’s condition before enrollment to ensure they meet specific eligibility criteria.[3]
For trials involving digestive diseases, researchers need to confirm the exact nature and extent of the condition being studied. Upper endoscopy with biopsy provides this detailed information. For instance, trials testing new treatments for Barrett’s esophagus require endoscopic confirmation of the condition and tissue samples showing the specific cellular changes characteristic of the disease.[10]
In studies examining treatments for esophageal or stomach cancer, endoscopy helps determine the tumor’s size, location, and characteristics. These baseline measurements are essential for later assessing whether a treatment is working. Endoscopic findings also help classify the stage of disease, which often determines which clinical trials a patient is eligible to join.[7]
For research on acid reflux and GERD, endoscopy can document the degree of esophageal damage caused by stomach acid. This objective evidence supplements patient-reported symptoms and helps researchers track whether investigational treatments heal the damage. Similarly, trials for celiac disease or inflammatory bowel diseases use endoscopic biopsies to confirm diagnoses and monitor healing during treatment.[3]
Clinical trials may also require follow-up endoscopies at specific intervals during and after treatment. These repeated examinations allow researchers to directly observe changes in the digestive tract and collect tissue samples showing how cells respond to the treatment at a microscopic level. This type of detailed monitoring wouldn’t be possible without endoscopy.[11]
Safety and Quality Standards
Upper endoscopy used in clinical trials must meet rigorous standards. The procedure is typically performed by experienced gastroenterologists, and all equipment must be properly sterilized and maintained. Monitoring during the procedure follows the same safety protocols used in routine clinical care, with continuous tracking of vital signs and immediate availability of emergency equipment if needed.[7]
After the examination, patients in clinical trials receive the same recovery care and follow-up instructions as any patient undergoing endoscopy. Any complications or unexpected findings must be promptly reported to both the treating physician and the research team. This dual oversight helps ensure patient safety throughout the research process.[15]


