top of page
Rinnit logo – modern health products and health news

Upper Endoscopy (EGD): Purpose, Procedure, Preparation and Recovery

Nov 3
8 min read

Updated: 3 days ago

Written and medically reviewed by Dr. Baraa Alnahhal, MD · Last reviewed: November 2026 · How we review

Quick Answer: What is an upper endoscopy (EGD)?

An upper endoscopy, also called an EGD, is a test that uses a lighted camera on a flexible tube to look inside the esophagus, stomach and duodenum. It helps find the cause of symptoms such as pain, heartburn or trouble swallowing, and tools can take biopsies. It takes 30 to 60 minutes, and most people receive sedation. [1]

What the research says

  • Most upper endoscopies in community studies are normal, and cancer is rare. A review of 15 studies with 41,763 people found that more than 85% of upper endoscopies were completely normal; erosive esophagitis was the most common finding (11.0%), followed by peptic ulcer (4.4%), while stomach or esophageal cancer was found in fewer than 0.4%. (Nasseri-Moghaddam et al., Clinical Gastroenterology and Hepatology, 2023) [2]

  • A slower, more careful look finds more warning signs. In a study of 837 people having a first diagnostic upper endoscopy, doctors whose normal exams took longer than 7 minutes on average had 2.5 times the odds of finding high-risk stomach changes and 3.4 times the odds of finding cancer or dysplasia (precancerous change) compared with faster doctors. (Teh et al., Clinical Gastroenterology and Hepatology, 2015) [3]

  • Different sedation medicines carry similar breathing and blood pressure risks for an EGD. A pooled analysis of 12 studies with 1,161 patients found no significant difference in cardiopulmonary complications (low oxygen, low blood pressure, heart rhythm problems or pauses in breathing) during upper endoscopy between propofol and traditional sedatives such as midazolam (odds ratio 0.85). (Qadeer et al., Clinical Gastroenterology and Hepatology, 2005) [4]

Key takeaways

  • An upper endoscopy examines the esophagus, stomach and duodenum with a lighted camera on a flexible tube. [1]

  • It can diagnose conditions such as GERD, ulcers, gastritis and celiac disease, and it can treat some problems during the same test. [1]

  • You usually avoid eating for eight hours beforehand and need someone to drive you home. [1]

  • The test usually takes 30 to 60 minutes, and you go home the same day. [1]

  • Bloating and a sore throat are common afterward and usually ease within a day or two. [1]

What is an upper endoscopy used for?

An upper endoscopy is a procedure to examine the upper part of your digestive tract. A digestive tract specialist (gastroenterologist) guides the scope through your mouth to see the lining of your esophagus, stomach and duodenum on a monitor. [1]

What an upper endoscopy can do: look inside the esophagus, stomach and duodenum, diagnose conditions such as GERD and ulcers, take biopsies and treat problems like bleeding or narrowed passages

An upper endoscopy can look, diagnose, take biopsies and treat, often in one visit.

The test serves three main purposes: [1]

  • Diagnosis: finding the cause of symptoms you cannot explain.

  • Biopsy: taking small tissue samples to examine in the lab.

  • Treatment: fixing small problems on the spot by attaching tiny tools to the endoscope.

Endoscopy is a broad family of tests. An EGD is one type, and it is often called an upper endoscopy because it examines the upper digestive (GI) tract. [1]

Who might need an upper endoscopy?

Your provider may suggest an upper endoscopy if you have unexplained symptoms like: [1]

  • Abdominal pain

  • Nausea and vomiting

  • Swallowing problems

  • Weight loss

  • Heartburn

  • Chest pain that is not caused by the heart (non-cardiac chest pain)

  • Vomiting blood

  • Anemia

  • Functional indigestion

Swallowing problems are explained in our guide to dysphagia, and ongoing indigestion with normal tests is covered in our article on functional dyspepsia.

What can an upper endoscopy diagnose and treat?

An upper endoscopy lets your provider see problems directly and, in many cases, act on them during the same test. [1]

Can help diagnose

Can help treat

Acid reflux (GERD) and esophagitis

Taking tissue samples (biopsy)

Gastritis and duodenitis

Repairing holes

Stomach ulcers

Draining abscesses

Celiac disease and Crohn's disease

Opening narrowed passages

Swallowing disorders and hiatal hernia

Inserting medical devices for therapy

Barrett's esophagus and intestinal metaplasia

Managing bleeding in the upper digestive tract

Cirrhosis and portal hypertension

Removing polyps or tumors

Cancerous or noncancerous tumors

Removing swallowed objects

Source: [1]

Several of these conditions have their own guides, including esophagitis, hiatal hernia and intestinal metaplasia. Bleeding in the digestive tract is explained in our article on gastrointestinal bleeding.

How do you prepare for an upper endoscopy?

Preparation is simple, but following the instructions closely helps keep the test safe. [1]

  • Health screening. Your provider checks for conditions that could make sedation or anesthesia unsafe for you. [1]

  • Fasting. Avoid eating anything for eight hours before the procedure. You can usually drink clear liquids up to two hours before. [1]

  • Medicines. You may need to stop blood thinners and adjust diabetes medicines the day before. Follow your provider's instructions. [1]

  • A ride home. Arrange for a responsible adult to take you home. You cannot drive or operate heavy machinery after receiving the sedative. [1]

What happens during an upper endoscopy?

An upper endoscopy is an outpatient procedure, so you go home the same day. It usually takes about 30 to 60 minutes. [1]

Five steps of an upper endoscopy: IV and sedation, numbing spray and mouthguard, passing the scope through the mouth, inflating with air to view images, and taking biopsies or treating problems

The test may be uncomfortable, but it should not be painful.

Before the scope goes in

A nurse checks your vital signs and places an IV in your arm. Most people receive conscious sedation from an anesthesiologist, which makes you feel sleepy and relaxed, though you may not be completely asleep. General anesthesia is also an option. A local numbing spray is applied to your mouth and throat, a mouthguard is placed to protect your teeth, tongue and the scope, and you lie on your left side. [1]

Step by step

  1. Passing the scope: The provider guides the endoscope through your mouth into your esophagus, stomach and duodenum.

  2. Inflating with air: Air is pumped in to make the organs easier to see.

  3. Viewing images: The camera sends images to a monitor while the provider looks for problems.

  4. Biopsy if needed: Small tissue samples may be removed to examine in the lab.

  5. Treatment if needed: Small problems can be treated on the spot with tiny tools attached to the scope.

Source: [1]

Upper endoscopy at a glance

Item

Typical detail

Setting

Outpatient, home the same day

Performed by

A gastroenterologist

Sedation

Usually conscious sedation; general anesthesia is an option

Fasting

No food for 8 hours; clear liquids up to 2 hours before

Time

About 30 to 60 minutes

Position

Lying on your left side

Biopsy results

Up to 2 weeks

Source: [1]

What happens after an upper endoscopy?

After the test, you stay at the medical office until you are alert enough to be discharged. Because of the sedative, you may not remember the test. [1]

Your provider may discuss the results with you right away or at a separate appointment. If tissue samples were taken, biopsy results can take up to two weeks. [1] Your provider may also give you more specific food guidelines for the days after the test. [1]

How long does recovery from an upper endoscopy take?

Recovery is usually quick, and most side effects are mild and short-lived. [1]

Upper endoscopy recovery timeline from resting until alert with a driver home, to bloating easing in about a day, sore throat fading in one to two days and biopsy results within two weeks

Bloating and a sore throat usually ease within a day or two.

What to expect: [1]

  • Bloating and gas: Air is suctioned out at the end of the test, but some may remain. Bloating and passing gas can last about a day.

  • Sore throat: Your throat may feel sore for a day or two as the numbing medicine wears off. Cold foods and drinks can help.

  • No driving: Do not drive or operate heavy machinery after the sedative. A responsible adult needs to take you home.

What are the benefits and risks of an upper endoscopy?

The main benefit is that providers can diagnose, take biopsies or treat conditions without the risks of traditional surgery. The procedure is minimally invasive and painless, and you can go home the same day. [1]

An upper endoscopy is considered a relatively low-risk procedure, but complications can happen: [1]

Risk

What it means

Reaction to the sedative

Such as low blood pressure or low blood oxygen

Bleeding

Bleeding in the digestive tract

Infection

Infection in the digestive tract

Perforation

A tear in the lining of the digestive tract

Source: [1]

Research shows that the choice of sedative does not appear to change the risk of low oxygen or low blood pressure during an upper endoscopy. [4]

When should you call a doctor after an upper endoscopy?

Contact your healthcare provider if you notice any of these after the test: [1]

  • A chronic cough, or coughing up or vomiting blood

  • Difficulty swallowing

  • Fever and chills

  • Rectal bleeding or black, tarry stool

  • Severe throat pain, chest pain or abdominal pain

Conclusion

An upper endoscopy is a short outpatient test that lets your provider look directly at your esophagus, stomach and duodenum. It can explain symptoms such as heartburn, pain or trouble swallowing, and it can often treat problems like bleeding or narrowing during the same visit. [1]

Preparation mostly means fasting, reviewing your medicines and arranging a ride home. Recovery is usually limited to a day or two of bloating or a sore throat. If you have symptoms that need checking, ask your provider whether an upper endoscopy is right for you. [1]

Keep learning: Read our guides to acid reflux and GERD and peptic ulcer disease. For another overview of the test, see this guide to upper GI endoscopy.

FAQ

What is an upper endoscopy (EGD)?

An upper endoscopy, or esophagogastroduodenoscopy (EGD), is a test that uses a small, lighted camera on a long, flexible tube to examine the esophagus, stomach and duodenum. [1]

Why would I need an upper endoscopy?

It is used to find the cause of unexplained symptoms such as abdominal pain, nausea and vomiting, swallowing problems, weight loss, heartburn, non-cardiac chest pain, vomiting blood or anemia. [1]

What can an EGD diagnose?

It can diagnose conditions such as GERD, esophagitis, gastritis, duodenitis, celiac disease, Crohn's disease, stomach ulcers, Barrett's esophagus, hiatal hernia and cancerous or noncancerous tumors. [1]

Can problems be treated during an EGD?

Yes. Tiny tools attached to the scope can take biopsies, manage bleeding, open narrowed passages, drain abscesses, repair holes and remove polyps, tumors or swallowed objects. [1]

How long should I fast before an upper endoscopy?

Avoid eating for eight hours before the test. Clear liquids are usually allowed up to two hours before. Follow your provider's exact instructions. [1]

Will I be awake during an upper endoscopy?

Most people receive conscious sedation, which makes you sleepy and relaxed, though you may not be completely asleep. General anesthesia is also an option. [1]

Does an upper endoscopy hurt?

It may be uncomfortable, but it should not be painful. A numbing spray is used on your throat, and many people do not remember the test afterward. [1]

How long does an upper endoscopy take?

It usually takes about 30 to 60 minutes. It is an outpatient procedure, so you go home the same day. [1]

Can I drive after an upper endoscopy?

No. You cannot drive or operate heavy machinery after the sedative, so a responsible adult must take you home. [1]

What are the side effects after an EGD?

Bloating and passing gas can last about a day, and a sore throat may last a day or two. If a biopsy was taken, results can take up to two weeks. [1]

When should I call a doctor after an upper endoscopy?

Call your provider for fever or chills, difficulty swallowing, severe throat, chest or abdominal pain, coughing up or vomiting blood, or black, tarry stool. [1]

Related Reading

Gastrointestinal (GI) Tests: Types, Preparation and What to Expect explains the main types of tests used to check the digestive tract.

Balloon Enteroscopy: Single and Double Balloon Exams of the Small Intestine explains the balloon-assisted scope that reaches deep into the small intestine.

References

  1. Cleveland Clinic. EGD Procedure (Upper Endoscopy): What It Is & What To Expect. Cleveland Clinic. Last updated November 27, 2024. https://my.clevelandclinic.org/health/procedures/22549-egd-procedure-upper-endoscopy

  2. Nasseri-Moghaddam S, Mousavian AH, Kasaeian A, et al. What is the Prevalence of Clinically Significant Endoscopic Findings in Subjects With Dyspepsia? Updated Systematic Review and Meta-analysis. Clin Gastroenterol Hepatol. 2023;21(7):1739-1749.e2. PMID 35738355. https://doi.org/10.1016/j.cgh.2022.05.041

  3. Teh JL, Tan JR, Lau LJ, et al. Longer examination time improves detection of gastric cancer during diagnostic upper gastrointestinal endoscopy. Clin Gastroenterol Hepatol. 2015;13(3):480-487.e2. PMID 25117772. https://doi.org/10.1016/j.cgh.2014.07.059

  4. Qadeer MA, Vargo JJ, Khandwala F, et al. Propofol versus traditional sedative agents for gastrointestinal endoscopy: a meta-analysis. Clin Gastroenterol Hepatol. 2005;3(11):1049-1056. PMID 16271333. https://doi.org/10.1016/s1542-3565(05)00742-1

Medical disclaimer

This article is for general education only and does not replace advice from a qualified healthcare professional. Talk to your doctor about your own diagnosis and treatment, and seek emergency care right away for severe or sudden symptoms.

Comments


bottom of page