An upper GI procedure, formally called an esophagogastroduodenoscopy (EGD), is an exam where a doctor passes a thin, flexible camera through your mouth to look at three areas: your esophagus (the tube connecting your throat to your stomach), your stomach, and the first part of your small intestine called the duodenum. The whole process typically takes 15 to 30 minutes and is done under sedation, so you’re either drowsy or fully asleep for it.
Why Doctors Order an Upper GI Procedure
This procedure is both a diagnostic tool and, in many cases, a treatment opportunity. Your doctor might recommend it if you have persistent upper abdominal pain, especially when it comes with weight loss or loss of appetite. Difficulty swallowing, chronic acid reflux that hasn’t responded to medication, and unexplained vomiting are all common reasons. If you’ve had unexplained iron deficiency anemia and your doctor suspects you’re slowly losing blood somewhere in your upper digestive tract, an EGD can help locate the source.
Other indications include evaluating peptic ulcer disease, checking for celiac disease, investigating chronic diarrhea, and looking at esophageal narrowing (strictures). People with Barrett’s esophagus, a precancerous condition linked to long-term acid reflux, undergo regular surveillance EGDs to catch any changes early. The procedure is also used after someone swallows a caustic substance, to assess the extent of damage to the lining of the digestive tract.
What Happens During the Procedure
Before the scope goes in, you’ll receive sedation through an IV. The most common approach in the U.S. uses a combination of a sedative and a pain-relieving medication to put you in a state of moderate sedation, where you’re relaxed and unlikely to remember the procedure but still breathing on your own. Some centers use a stronger sedative that produces deeper sedation with a faster, more predictable recovery. Full general anesthesia with a breathing tube is rare and reserved for complex cases or patients with specific health concerns.
You’ll lie on your left side, and a mouth guard is placed between your teeth to protect them and the scope. The endoscope, a flexible tube about the width of your index finger with a camera and light at its tip, is guided through your mouth, past your throat, and into the esophagus. This initial passage through the throat is the trickiest part of the procedure from the doctor’s perspective, though you won’t feel it under sedation. From there, the camera travels through the stomach and into the duodenum. Most endoscopists examine the duodenum first, then carefully inspect the stomach on the way back out.
Throughout the procedure, your heart rhythm, blood pressure, and oxygen levels are continuously monitored.
Biopsies and Treatments Done During an EGD
One of the biggest advantages of an upper GI procedure over imaging tests like X-rays or CT scans is that the doctor can take tissue samples and perform treatments in the same session. Small instruments pass through a channel in the endoscope, so no additional incisions are needed.
Biopsies are routine and painless. If your doctor is checking for an H. pylori infection (a common bacterial cause of ulcers), they’ll typically take samples from several specific locations in the stomach. For suspected celiac disease, biopsies come from the duodenum. If there are ulcers that look like they could be caused by a viral infection, the biopsy location depends on the suspected virus: samples from the base of the ulcer for one type, from the edges for another.
Beyond diagnosis, the procedure can also be therapeutic. Doctors can remove polyps, stretch narrowed areas of the esophagus using dilation tools, stop active bleeding from ulcers or abnormal blood vessels, and remove foreign objects that have been swallowed. This dual capability is a major reason EGD is considered the gold standard for evaluating upper digestive problems.
How to Prepare
Preparation is straightforward. You should stop eating solid food after midnight the night before your procedure and have nothing to eat or drink for at least eight hours beforehand. If you take daily medications, you can usually take essential ones up to four hours before the exam with small sips of water, but you’ll need to skip antacids and stomach-coating medications. Your doctor’s office will give you specific instructions about blood thinners, diabetes medications, and anything else that might need to be paused or adjusted.
Because you’ll be sedated, you won’t be able to drive yourself home. Arrange for someone to pick you up before you even arrive for the appointment.
Recovery After the Procedure
After the scope is removed, you’ll be moved to a recovery area where nurses monitor your vital signs as the sedation wears off. Most people are awake and alert enough to be discharged within one to two hours. The clinical benchmark is that you can walk steadily in a straight line, your vital signs are stable, and you’re oriented and responsive.
You may have a mild sore throat for a day or so from the scope passing through, and some people feel bloated because air is pumped into the stomach during the exam to give the doctor a better view. These effects are temporary. Your care team will give you written instructions about when to start eating and drinking again, and what to watch for in the unlikely event of a complication.
Plan to take the rest of the day off. Even if you feel fine, sedation can affect your judgment and reaction time for several hours. Most people return to normal activities the following day.
Risks and Complications
Upper GI endoscopy is one of the safest procedures in gastroenterology. In a large survey of over 2,300 endoscopies, complications occurred in less than 1% of cases. Major complications, which include perforation (a small tear in the digestive tract wall), aspiration (inhaling stomach contents into the lungs), and significant bleeding, are rare. Minor complications like a small mucosal tear, a brief change in heart rhythm, or a reaction to sedation medication are also uncommon.
Your risk goes up slightly if the procedure involves a therapeutic intervention like polyp removal or dilation, compared to a purely diagnostic exam. Your doctor will weigh these risks against the information or treatment the procedure can provide.

