An upper endoscopy is a procedure where a doctor passes a thin, flexible tube with a tiny camera down your throat to examine your esophagus, stomach, and the first part of your small intestine (the duodenum). Its formal medical name, esophagogastroduodenoscopy (EGD), literally describes those three stops. The procedure is used both to diagnose problems and, in some cases, to treat them on the spot.
Why Doctors Order an Upper Endoscopy
The most common reason is to investigate digestive symptoms that haven’t responded to initial treatment or that raise concern. These include persistent heartburn, difficulty swallowing, unexplained nausea or vomiting, abdominal pain, and signs of gastrointestinal bleeding like vomiting blood or dark stools. If acid reflux hasn’t improved with medication, an EGD lets the doctor look directly at the tissue lining your esophagus to check for damage.
Beyond symptom investigation, the procedure is used to diagnose specific conditions. During the exam, the doctor can take small tissue samples (biopsies) to test for celiac disease, peptic ulcers, bacterial infections like H. pylori, Barrett’s esophagus, or unexplained anemia and diarrhea. The camera can also reveal narrowing of the esophagus, inflammation, or abnormal growths that wouldn’t show up on standard imaging.
Upper endoscopy isn’t just diagnostic. Special tools can be threaded through the scope to stretch a narrowed esophagus, stop active bleeding, or remove small growths, all during the same appointment.
How to Prepare
Preparation centers on having an empty stomach so the doctor can see clearly and to reduce the risk of aspiration. The standard rule is to stop eating and drinking at midnight the night before your procedure. On the morning of the exam, you can take essential medications with a few small sips of water, but only if that’s at least four hours before your appointment time. During those final four hours, nothing should go in your mouth, including water and chewing gum. If you eat or drink within that window, your procedure will likely be delayed or canceled.
If you take blood thinners, your care team should contact you about two weeks before the procedure to discuss whether to pause or adjust them. Supplements like vitamin E, fish oil, mineral oil, and flaxseed oil are typically stopped three days beforehand because they can increase bleeding risk.
People who take diabetes or weight loss medications need to pay extra attention. Oral diabetes drugs are generally held the morning of the procedure. Metformin is usually stopped the night before. GLP-1 medications, a category that includes semaglutide (Ozempic, Wegovy) and tirzepatide, require a longer pause: daily versions are stopped two days before, and weekly injections are stopped at least seven days before. These drugs slow stomach emptying, which can leave food in the stomach and increase risk during sedation. If you use insulin, your doctor will give you specific instructions on reducing your dose while you’re fasting.
What Happens During the Procedure
The procedure itself typically takes 15 to 20 minutes. You’ll change into a gown and lie on your side. A nurse will place a small clip on your finger to monitor your oxygen levels, along with a blood pressure cuff and heart monitor.
Before the scope goes in, a numbing spray is applied to the back of your throat to suppress your gag reflex. The spray can taste bitter; holding your breath while it’s applied helps reduce the taste. You’ll also receive sedation through an IV. The most common approach in the U.S. is moderate sedation using a combination of a sedative and a pain reliever, which keeps you relaxed and drowsy but not fully unconscious. Some facilities use a faster-acting agent that produces deeper sedation, with effects that wear off within minutes. Full general anesthesia is rarely needed for a routine upper endoscopy.
Once you’re sedated and your throat is numb, the doctor gently guides the scope into your mouth, down your esophagus, through your stomach, and into the duodenum. You may feel pressure or a sense of fullness, but the sedation keeps most people comfortable enough that they remember little or nothing afterward. If biopsies are needed, tiny forceps are passed through the scope to collect tissue samples. You won’t feel this.
Risks and Complications
Upper endoscopy is one of the safest procedures in gastroenterology. The most serious potential complication, perforation (a small tear in the lining of the digestive tract), occurs in fewer than 1 in 2,500 diagnostic procedures. Clinically significant bleeding after a diagnostic EGD with biopsies is exceedingly rare.
Sedation carries its own small set of risks. These include a temporary drop in blood pressure, restlessness or agitation (particularly with certain sedatives), and, very rarely, aspiration pneumonia from stomach contents entering the lungs. The fasting requirements exist specifically to minimize that last risk. The numbing throat spray can, on rare occasions, trigger an allergic reaction.
Most people experience nothing more than a mild sore throat and some bloating afterward, both of which resolve within a day.
Recovery and Getting Back to Normal
After the scope is removed, you’ll spend 30 to 60 minutes in a recovery area while the sedation wears off. Nurses will monitor your vital signs and make sure you’re alert enough to go home. You’ll likely feel groggy and may not remember much of the recovery period itself.
Because sedation impairs your judgment and reflexes for the rest of the day, you will not be able to drive yourself home. Arrange for someone to pick you up before you schedule the procedure. Most facilities also recommend avoiding signing important documents, operating heavy machinery, or making major decisions for the remainder of the day.
You can usually eat within a few hours, starting with soft foods and working up to your normal diet as you feel comfortable. Some people notice mild throat discomfort or a bloated feeling from the air introduced during the exam, but this passes quickly. Most people return to work and normal activities the following day.
Getting Your Results
Your doctor can often share preliminary findings right after the procedure, since they’ve seen your digestive tract in real time on a monitor. If everything looked normal visually, they’ll tell you. If they noticed inflammation, ulcers, narrowing, or anything unusual, they’ll explain what they saw and what it might mean.
Biopsy results take longer, typically several days to two weeks depending on the lab and what’s being tested. These results can confirm or rule out conditions like celiac disease, H. pylori infection, Barrett’s esophagus, or precancerous changes that weren’t visible to the naked eye. Your doctor’s office will usually call or send a message through a patient portal once results are in.

