An upper endoscopy is a procedure in which a doctor passes a thin, flexible tube with a camera and light on its tip through your mouth, down your throat, and into your esophagus, stomach, and the first portion of your small intestine. The whole thing typically takes between five and twenty minutes, though you’ll spend considerably longer at the facility due to preparation and recovery from sedation. The procedure sounds more intimidating than it usually feels, largely because most people are sedated and remember little or nothing afterward. Understanding what to expect at each stage can take much of the uncertainty out of the experience.
Why Doctors Order an Endoscopy
The most common reasons for an upper endoscopy include persistent abdominal pain, difficulty swallowing, unexplained nausea or vomiting, heartburn that does not respond to medication, and suspected bleeding in the upper digestive tract. In children, abdominal pain and dyspepsia account for nearly half of all referrals, with vomiting making up another large share.1Egyptian Pediatric Association Gazette. Indications, diagnostic yield, and appropriateness of upper gastrointestinal endoscopy in Egyptian children and adolescents: a retrospective two-centre study For adults, guidelines from gastroenterology societies help doctors decide who genuinely needs the procedure. A systematic review found that endoscopies classified as “appropriate” by these guidelines detect relevant findings more often than those judged inappropriate, and cancers are far more likely to appear in the appropriately ordered group.2PubMed. Diagnostic yield of upper endoscopy according to appropriateness: A systematic review
Beyond diagnosis, endoscopies also serve as treatment tools. Doctors can stop bleeding, stretch narrowed sections of the esophagus, remove polyps, or extract swallowed foreign objects, all through the same scope. Therapeutic procedures carry somewhat higher complication rates than purely diagnostic ones, so your doctor weighs the risks differently depending on what they expect to find and do.3PubMed. Complications of upper gastrointestinal endoscopy and their management
How to Prepare
Your doctor’s office will give you specific instructions, but the broad strokes are consistent. You’ll fast for at least six to eight hours before the procedure, meaning no food and, in the final two hours, no liquids. The goal is an empty stomach so the doctor can see clearly and to reduce the risk of aspirating stomach contents while sedated.
Medication adjustments are common. Blood thinners require careful planning: your doctor will weigh the risk of a blood clot if you stop the medication against the risk of bleeding during the procedure, and the answer differs depending on which drug you take and how much the endoscopy might involve tissue removal or biopsy.4PubMed Central. Blood thinners and gastrointestinal endoscopy If you take insulin or other diabetes medications, your doctor will usually adjust your dose because you’ll be fasting.
GLP-1 Medications and Endoscopy
If you take a GLP-1 or GLP-1/GIP receptor agonist, the class of drugs that includes semaglutide (Ozempic, Wegovy) and tirzepatide (Mounjaro, Zepbound), pay extra attention to your pre-procedure instructions. These drugs slow stomach emptying, which means food can sit in your stomach longer than usual. A randomized trial stopped early for safety found that patients who continued their GLP-1 medication before an upper endoscopy had a much higher rate of food remaining in the stomach compared to those who paused it. Among patients having an endoscopy alone, without a bowel prep beforehand, roughly half of those who kept taking the drug had clinically significant retained food, compared to about one in twenty who stopped it.5PubMed Central. Holding vs Continuing GLP-1/GIP Agonists Before Upper Endoscopy: The OCULUS Randomized Clinical Trial
Retained food is not just an inconvenience. It can obscure the view, force the procedure to be rescheduled, and in the worst case, lead to aspiration under sedation. Current guidance from anesthesiology societies generally recommends holding these medications before elective procedures, though the exact timing varies by drug and dose. A meta-analysis noted that fasting protocols reported across studies were inconsistent, so there is not yet a single agreed-upon standard.6PubMed Central. Effect of GLP-1 receptor agonists on upper gastrointestinal endoscopy outcomes: a systematic review and meta-analysis The practical takeaway: tell your endoscopy team about these medications well in advance, and follow whatever hold schedule they give you.
Dealing with Anxiety Beforehand
Feeling anxious before an endoscopy is extremely common, and it can affect everything from your sleep the night before to your blood pressure the morning of. Research has explored several ways to take the edge off. One trial found that watching an animated simulation of the procedure in advance reduced patients’ anxiety and improved their sleep quality compared to standard written or verbal explanations alone.7PubMed Central. Impact of simulated animated video education on patients’ disease uncertainty, anxiety, and sleep quality in digestive endoscopy examination Another randomized study tested virtual reality headsets in the waiting area before colonoscopy and found that the VR group had lower anxiety scores and lower blood pressure readings by the time the procedure started.8PubMed Central. Effectiveness of Virtual Reality Intervention on Anxiety and Vital Signs of Patients Before Colonoscopy: A Randomised Controlled Study
You don’t need a VR headset to benefit from the underlying principle. Much of pre-procedure anxiety comes from uncertainty about what will happen. Asking your doctor to walk you through the steps, watching a reliable video of the procedure, or simply knowing the timeline can quiet the “what if” loop. Arriving early enough that you’re not rushed also helps.
What Happens During the Procedure
When you arrive, a nurse will place an intravenous line, usually in your arm or hand. You’ll change into a gown and lie on your left side on the procedure table. A small plastic mouthpiece goes between your teeth to protect them and keep your mouth open for the scope. If you’re receiving sedation, the medications go through your IV at this point.
The endoscope itself is a remarkable piece of engineering. At its core, light generated by an external source travels through fiber-optic bundles to illuminate the inside of your digestive tract, while a tiny camera chip at the tip captures images and sends them back to a monitor. The doctor watches the screen in real time and can maneuver the scope’s tip with controls on the handle, bending it to navigate the curves of your anatomy. Modern scopes also have a working channel through which the doctor can pass tiny instruments for biopsies, inject fluid, or apply treatments.
The scope is lubricated and gently guided past the back of your throat and into your esophagus. Air or carbon dioxide is pumped in through the scope to gently inflate the digestive tract, giving the doctor a better view. This is what occasionally causes a bloated or gassy feeling afterward. The doctor examines the lining of the esophagus, stomach, and duodenum on the way down and again on the way back up. If anything looks suspicious, or sometimes even if the tissue looks normal, small biopsies are taken with forceps passed through the scope. In pediatric studies, biopsying normal-looking tissue proved important because the endoscopic appearance alone missed a substantial share of abnormal findings.1Egyptian Pediatric Association Gazette. Indications, diagnostic yield, and appropriateness of upper gastrointestinal endoscopy in Egyptian children and adolescents: a retrospective two-centre study You won’t feel the biopsies. The entire exam portion typically takes five to fifteen minutes.
Sedation and What It Means for Your Experience
Most upper endoscopies in the United States and many other countries are performed under “moderate” or “conscious” sedation, sometimes called twilight sedation. You receive a combination of a sedative and a pain reliever through your IV. The most common agents are midazolam (a benzodiazepine) and propofol. You’re not fully unconscious in the way general anesthesia makes you, but most people drift into a drowsy, relaxed state and remember very little afterward.
The choice and dose of sedation affect how quickly you wake up. One study found that the average recovery time after sedated upper endoscopy was about fifty minutes, with higher doses of midazolam adding a few minutes to that time.9PubMed Central. Factors Affecting Recovery Time after Sedation for Upper Gastrointestinal Endoscopy Propofol-based sedation tends to produce quicker recovery than midazolam alone, which is one reason it has become more popular.
Some facilities offer the option of an unsedated endoscopy, especially in parts of Europe and Asia where this is more culturally accepted. Without sedation you’re fully alert during the procedure, which means you can drive yourself home afterward and skip the recovery waiting period. The trade-off is that you’ll feel the scope passing through your throat and may gag, which many people find quite unpleasant. Throat-numbing spray helps, but it doesn’t eliminate the sensation entirely.
Transnasal Endoscopy
A growing alternative to the standard oral route is transnasal endoscopy, in which an ultrathin scope is inserted through the nose rather than the mouth. The scope is considerably thinner, typically under six millimeters in diameter, and it passes over the soft palate and into the esophagus without triggering the gag reflex the way a mouth-inserted scope does. This makes sedation unnecessary for most patients.
Evidence suggests that transnasal endoscopy is well tolerated. In a Canadian study of over two hundred patients, complete examinations were possible in 98% of cases. Patients reported low scores for choking, nasal discomfort, sore throat, and abdominal pain, and 88% said they would be willing to have the same procedure again.10PubMed Central. Unsedated transnasal endoscopy: a Canadian experience in daily practice The main area of discomfort is in the nose during initial insertion, which can be managed with topical anesthetic sprayed into the nostril beforehand.11PubMed Central. Transnasal endoscopy: no gagging no panic!
Diagnostically, transnasal endoscopy performs comparably to standard oral endoscopy for detecting conditions like Barrett’s esophagus, reflux-related disease, and gastric cancer. One area of potential weakness is the detection of very small, early-stage stomach lesions, particularly in the upper part of the stomach, where the thinner scope’s image quality and maneuverability may be slightly limited.11PubMed Central. Transnasal endoscopy: no gagging no panic! Newer single-use ultrathin scopes have improved visualization and include a working channel large enough for standard biopsies, making the approach increasingly practical for routine diagnostic use in both adults and children.12PubMed Central. Safety and efficacy of a novel ultrathin gastroscope for unsedated transnasal endoscopy in children and adults for evaluation of upper GI disorders
Recovery After the Procedure
Once the scope is removed, you’re wheeled to a recovery area where nurses monitor your vital signs as the sedation wears off. Most people spend between thirty minutes and an hour in recovery, though it can stretch longer depending on the drugs used and your individual response. Studies of discharge scoring systems found that roughly 40% of patients met discharge criteria within an hour, while about 5% needed more than two hours.13PubMed Central. Usefulness of discharge standards in outpatients undergoing sedative endoscopy: a propensity score-matched study of the modified post-anesthetic discharge scoring system and the modified Aldrete score Standardized scoring tools that objectively measure alertness and stability have helped cut average recovery times by roughly 20% to 35% across different procedure types without compromising safety.14PubMed Central. Implementation of the Aldrete score reduces recovery time after non-anesthesiologist-administered procedural sedation in gastrointestinal endoscopy
You’ll likely feel groggy and a bit foggy for the rest of the day if you received sedation. Because your judgment and reaction time remain impaired for hours after, you must have someone else drive you home, and most guidelines say you should avoid operating machinery, signing legal documents, or making major decisions for the remainder of the day. A mild sore throat and bloating from the air pumped during the procedure are the most common complaints. Both usually resolve within a day. You can typically eat and drink within a few hours, starting with something light. Your doctor will let you know if biopsy results are pending and when to expect them, usually within a few days to a week.
Complications and How Rare They Are
Diagnostic upper endoscopy is one of the safest procedures in medicine. Overall complication rates for diagnostic endoscopy fall between roughly 0.1% and 0.25%.3PubMed. Complications of upper gastrointestinal endoscopy and their management The serious complications to know about include:
- Perforation: A tear in the wall of the esophagus, stomach, or duodenum. This is the most feared complication. Prospective studies report perforation rates between about 1 in 2,500 and 1 in 11,000 for diagnostic procedures. Risk factors include certain anatomical features like esophageal narrowing, diverticula, or tumors in the upper digestive tract.15BMJ. Complications of diagnostic upper Gastrointestinal endoscopy: common and rare – recognition, assessment and management
- Bleeding: Minor bleeding from a biopsy site is common and almost always stops on its own. Significant bleeding that requires intervention is rare during diagnostic endoscopy and more associated with therapeutic procedures.
- Aspiration: Inhaling stomach contents into the lungs during the procedure. Proper fasting dramatically reduces this risk, which is precisely why the fasting instructions exist.
- Reactions to sedation: These range from mild drops in blood pressure or oxygen levels, which the monitoring team manages in real time, to very rare serious cardiopulmonary events.
Therapeutic procedures carry higher risks. Esophageal dilation, for example, has a perforation rate of about 0.25%, while pneumatic dilation for achalasia carries a roughly 3% risk.3PubMed. Complications of upper gastrointestinal endoscopy and their management Your doctor should discuss these procedure-specific risks with you before anything therapeutic is planned.
After going home, contact your doctor if you develop a fever, chest pain, worsening abdominal pain, difficulty swallowing, or vomit blood. These could signal a perforation or delayed bleeding and need prompt evaluation.
Endoscopy in Children
The basic mechanics of an upper endoscopy are the same in children, but the details differ in important ways. Pediatric endoscopists use smaller scopes, with instruments under six millimeters in diameter recommended for infants and children under 10 kilograms. Equipment for pediatric resuscitation and airway management must be immediately available, and the sedation team should include personnel specifically trained in pediatric life support.16PubMed. Modifications in endoscopic practice for pediatric patients
The indications also shift. In children, swallowed foreign objects and caustic substance ingestion are more common reasons for urgent endoscopy. Guidelines recommend endoscopy within 24 hours for symptomatic children who may have swallowed caustic substances, and emergent removal for esophageal button batteries or multiple rare-earth magnets because of the severe tissue damage these can cause in a short time.16PubMed. Modifications in endoscopic practice for pediatric patients When possible, pediatric-trained endoscopists should perform these procedures; when adult-trained specialists handle them, coordinating with pediatricians is strongly recommended.
Advanced Imaging and Artificial Intelligence
A standard endoscopy uses white light, which is essentially what your eyes would see if you could look inside the digestive tract. But newer imaging modes built into modern scopes can reveal details that white light misses. Narrow band imaging, for instance, filters the light to specific wavelengths that make blood vessel patterns on the mucosal surface stand out more clearly. These patterns differ between normal tissue, inflamed tissue, and potentially cancerous tissue. Studies have found that narrow band imaging and chromoendoscopy, a technique where dye is sprayed onto the surface, are both better than white light alone at predicting what a polyp will look like under the microscope.17PubMed Central. White light endoscopy, narrow band imaging and chromoendoscopy with magnification in diagnosing colorectal neoplasia These tools help doctors make more informed decisions about which lesions to biopsy or remove during the same session rather than after.
Artificial intelligence is the newest layer being added. AI systems trained on thousands of endoscopic images can flag suspicious areas in real time as the doctor performs the procedure. A systematic review and meta-analysis found that AI outperformed endoscopists in detecting cancerous lesions in the stomach, identifying Barrett’s esophagus, and determining the presence of a particular stomach infection.18PubMed. Accuracy of artificial intelligence-assisted detection of upper GI lesions: a systematic review and meta-analysis The AI acts as a second pair of eyes, not a replacement for the doctor. In practice, this means a subtle lesion that a tired or distracted endoscopist might scroll past could get highlighted by the algorithm. Several AI-assisted platforms have received regulatory clearance in the US and Europe for use during colonoscopy, and upper-GI-focused systems are following closely behind.
For you as a patient, the presence of these technologies is mostly invisible. The scope looks the same, the procedure feels the same, and the doctor is still the one making decisions. But the quiet addition of enhanced imaging and AI assistance means that the same ten-minute look inside your digestive tract yields more diagnostic information than it did even a decade ago, catching problems earlier and with fewer repeat procedures.