What Is an EGD Procedure (Upper Endoscopy)?

How an esophagogastroduodenoscopy can diagnose and treat conditions

An upper endoscopy, also known as an esophagogastroduodenoscopy (EGD), is a minimally invasive procedure used the examine the lining of esophagus (feeding tube), stomach, and duodenum (the upper part of the small intestine). EGDs are used by specialists known as gastroenterologists to diagnose and/or treat disorders of the upper gastrointestinal (GI) tract.

EGD is a form of endoscopy in which a fiber-optic scope equipped with a camera can look inside the body without the need for an incision. For an EGD, the endoscope is inserted through the mouth and throat, usually under mild sedation. Specialized tools can be threaded though the neck of the scope to stop bleeding, repair injuries, remove unwanted or diseased tissues, or obtain tissue samples via biopsy.

This article describes how an EGD works, why one may be ordered, and the potential risks and limitations of the procedure. It also explains how to prepare for an EGD and what to expect on the day of the procedure.

what to expect during an EGD

 Verywell / Emily Roberts

The EGD Procedure

An upper endoscopy can serve as an intervention, a diagnostic tool, or both. The procedure may be part of your medical care if your healthcare provider needs access to your upper GI tract's lumen, or opening. Both children and adults can undergo this procedure.

An EGD uses an endoscope that is advanced from the mouth down to the GI tract. The endoscope is thin and flexible, and it has a camera and microsurgical tools attached. The camera is used to view the inner lining of the lumen.

Your healthcare provider might also take pictures or record a video of the region to help form a diagnosis and plan future treatments. The surgical tools can be used to remove and repair defects and disease.

Your EGD may include one or more of the following procedures:

  • Duodenoscopy, which accesses the inside of the duodenum, the first part of the small intestine
  • Esophagoscopy, which reaches inside of the esophagus
  • Gastroscopy, which extends to the inside of the stomach

An EGD does not visualize the upper GI system from the outside. Nor does it provide reliable information about the lungs, liver, spleen, or other nearby organs.

Symptoms Checked by an EGD

Often, your gastroenterologist will want to investigate one or several different symptoms because they suspect a specific condition. Or, you may already have a diagnosis for a condition that needs to be monitored.

For example, heartburn and abdominal pain may point more to peptic ulcer disease (PUD) rather than indigestion which, along with an acidic taste in your mouth, is common to gastroesophageal reflux disease (GERD).

The EGD procedure also allows for a tissue biopsy to check for the presence of a Helicobacter pylori infection as an underlying cause of the PUD. It can allow for a diagnosis of esophageal cancer in the presence of unexplained weight loss, or identify esophageal varices (dilated blood vessels) when someone is coughing up blood (hemoptysis).

Your healthcare provider also may recommend an EGD if you have other symptoms including:

  • Chest pain
  • Hematemesis (vomiting blood)
  • Excessive or persistent vomiting
  • Excessive or unusual burping
  • Painful swallowing (odynophagia)
  • Swallowing difficulties (dysphagia)
  • Unexplained anemia (low red blood cell function)

EGD Procedure Risks

Your healthcare provider might recommend that you postpone having an upper endoscopy if you have an active pulmonary disease such as asthma, severe exacerbations of chronic obstructive pulmonary disease (COPD), or severe heart disease that could interfere with anesthesia.

Likewise, an infection in the nose, throat or pulmonary system, especially if the procedure is being done for diagnostic purposes, would be enough to postpone the procedure.

Generally, complications from an EGD are mild and become apparent during the procedure or within a few days. Serious complications are possible, but they are uncommon.

Abrasion or a tear of the inner lining of your esophagus, stomach, or small intestine can cause bleeding. This can heal on its own if the abrasion is small. If it's larger, it can cause blood loss and might need to be repaired during your EGD procedure or later on.

The intervention can also cause a puncture in your upper GI tract, which could lead to serious bleeding or a life-threatening gastric fluid leak that would require urgent repair. Cardiac or respiratory effects of the anesthesia are also possible, especially for people who have severe underlying heart or lung disease.

Esophagogastroduodenoscopy Complications

Complications are more likely if you already have a major upper GI disorder prior to the procedure, such as a bleeding ulcer or a large tumor. Additionally, a therapeutic EGD causes more tissue disruption than a diagnostic EGD and is more likely to cause complications.

EGD Procedures

The EGD can be used to diagnose and treat a number of conditions. Depending on the circumstances, your healthcare provider may respond to what they find by:

  • Cutting out a growth (like cancer)
  • Repairing an open lesion (like an ulcer)
  • Tying off esophageal varices (dilated blood vessels)
  • Using heat or cold to destroy an abscess (a swollen mass of tissue)
  • Using a balloon-like device or laser therapy for dilatation (widening) of your upper GI tract

EGD has also been used in the treatment of severe obesity as one of the alternatives to other types of weight loss surgery. This procedure involves techniques such as reducing the size of the stomach using an endoscopic approach to place sutures rather than by using an abdominal incision.

Other conditions that may be diagnosed or treated with an EGD include:

Other Reasons for an EGD Test

You may also need to have an EGD if you've already had an abdominal X-ray, ultrasound, or computed tomography (CT scan) suggesting an abnormality of your upper GI tract's lumen.

Typically, imaging tests can visualize the anatomic structure of the upper GI system and nearby organs, but they do not provide a view of the appearance of the inner lining itself. This makes an upper endoscopy a useful adjunct when used with imaging tests.

EGD is also considered when a medical history and physical examination suggest the possibility of a lesion in the lumen that could not be well-visualized with a less invasive test, like an imaging test. In addition, if you've ingested a foreign body or a caustic substance, an EGD may be appropriate.

As a diagnostic tool, EGD is also useful when it's the easiest and safest way to obtain a biopsy. During the procedure, your healthcare provider may collect one or more tissue samples so they can be examined under a microscope.

How to Prepare

Before your EGD, your healthcare provider may order imaging tests to help plan your procedure.

Common questions:

  • Where will the EGD be done? EGDs are typically conducted in an endoscopy suite (a special procedure room). It may be located in a hospital, a surgical center, or an outpatient clinic. Ask your healthcare provider to be certain.
  • How long does the EGD procedure take? It takes about 30 to 60 minutes for your healthcare provider to examine the esophagus, stomach, and duodenum during an upper endoscopy.
  • What should I wear? You'll wear a gown during the procedure. Since you may be bloated after the EGD, wear clothing that is loose around the waist.
  • Can I eat or drink beforehand? Your healthcare provider might advise you to modify your diet up to several weeks prior to your EGD. For example, you might be instructed to avoid gluten if there is a concern that you could have celiac disease. Otherwise, you'll be asked to stop eating and drinking for about eight hours prior to your EGD. You may be permitted to drink clear liquids for up to five hours prior to your appointment. Check with your healthcare provider, who may have other guidelines for you.
  • Can I keep taking my medications right up until the time of the procedure? Ask your provider to be sure. Expect to be told to stop taking blood thinners a few days before the test.
  • What should I bring with me? Bring your EGD order form (given to you by your healthcare provider), your health insurance card, a form of personal identification, and a means to pay your portion of the bill.

Upper Endoscopy Cost

The EGD procedure cost will vary widely depending on where you live, if or what type of insurance you have, and the type of facility where your procedure is done. Keep in mind that there may be separate charges for a gastroenterologist's work, an anesthesiologist, and the facility used. As an example, Medicare coverage based on a national average of $557 will require an out-of-pocket payment of $110 when the EGD is done at a surgical center.

What to Expect

When you check-in for your EGD, you will be asked to fill out some forms, including a consent form, authorization for payment, and a patient privacy form.

Before the Procedure

Sometimes, there is a pre-operative area where you can change into a gown before your procedure. But often, patients do this in the procedure suite. If you have them, dentures or partial plates should be removed so the numbing medicine can reach all areas of the mouth and so that the endoscope doesn't damage them.

Your heart rate, blood pressure, respiratory rate, and oxygen level will be monitored throughout the procedure. You will have a pulse oximeter placed on your finger that measures oxygen saturation and pulse. A blood pressure cuff will be placed on your arm.

You will need to have intravenous (IV) sedation as well as local numbing medicine administered to your throat to prevent discomfort and gagging. Once the IV medication is injected, it will make you sleepy and relaxed. Depending on the drug, it may put you to sleep or leave you mildly sedated.

Your throat will then be sprayed with the medicine, which will have a numbing effect for about 30 to 45 minutes. You will be given a protective device to put in your mouth to protect your teeth from the endoscope. You will then be positioned so that you lie on your left side.

Is an Upper Endoscopy Painful?

No. When you go for your procedure, a healthcare provider will place an IV line in your hand or arm; you should feel an initial pinch, but no pain thereafter. Once sedated, the EGD will not cause any pain. It's possible that you may have mild throat irritation afterward, but check with your healthcare provider if you have concerns.

During the Procedure

When you are adequately relaxed, you may be asked to swallow once or twice during the initial period of insertion of the endoscope. The tube will not interfere with your ability to breathe, and it is only mildly uncomfortable following the initial insertion.

You may experience a feeling of fullness in your abdomen as the healthcare provider injects a moderate amount of air to expand your stomach, allowing for better visualization. Pictures or videos may be taken of the inside of your digestive tract to monitor abnormalities and for treatment planning.

A biopsy may be taken for examination. If you are having an EGD for treatment of a gastrointestinal condition, electrosurgical instruments attached to the endoscope will be used as planned.

After the Procedure

After the endoscope is removed, your medical team will let you know that your procedure is complete. You may not recall the procedure because of the effect of the sedation.

You will need to recover and wait until you are awake and alert before being discharged. In the meantime, you might have vital signs like your blood pressure and pulse monitored. Be sure to let your medical team know if you feel discomfort or pain.

Your healthcare provider will either discuss the results of your upper endoscopy with you immediately after the procedure or schedule another appointment to do so and devise a plan, especially if you had a biopsy. This may take several days or weeks. Be sure you understand the next step before you leave.

Recovery from EGD

Recovery from the endoscopy should take no more than a few days. Call your healthcare provider if:

  • Your throat discomfort lasts longer than a few days
  • You experience worsening pain or trouble swallowing
  • You develop swelling in the back of your throat

Call for immediate medical attention if you experience unusual or severe abdominal pain or bleeding following the procedure. Dark-colored stools or coughing, spitting, or vomiting blood are signs to report to your provider. Lightheadedness or dizziness can signal severe blood loss and require urgent medical attention.

How Long Does It Take to Recover From an EGD?

Recovery time after your upper endoscopy typically takes between 30 and 60 minutes. You may feel sedation effects for several hours, and you may have a slightly sore throat for about a day.

Your healthcare provider will give you recovery instructions on eating, drinking, and activities. They'll usually call the next day to follow up, too. Be sure to ask them if you have questions, and contact them immediately about any complications.

Long-term Care

You shouldn't need long-term care because of an EGD procedure, per se. But you may need treatments to manage issues that the EGD detects. Treatments might include chemotherapy and radiation therapy for cancer, surgery for a hernia, or anti-inflammatory medication for Crohn's disease.

Possible Future Surgeries

In general, you should not need another EGD. But if your symptoms unexpectedly worsen or you develop new symptoms, your healthcare provider may order a repeat procedure to find out what's going on.

Lifestyle Adjustments

Depending on your condition, you might have to make dietary changes. For example, your healthcare provider or a dietitian may recommend avoiding acidic foods that exacerbate an ulcer. Or you might need to limit meals to small portions if the EGD found an upper GI constriction.

Keep in mind that each GI condition is managed with a personalized diet. There is no one-size-fits-all strategy.


An esophagogastroduodenoscopy (EGD) is a diagnostic test that visualizes the esophagus, stomach, and upper portion of the small intestine. It can function as an intervention, a diagnostic tool, or both.

A gastroenterologist performing an EGD relies on a miniature camera with tiny surgical tools attached to it. This allows them to examine and identify GI disorders, remove tissue samples for lab tests, or treat certain GI conditions.

Sedation is required, and you may have a mild sore throat and some bloating afterwards.

A Word From Verywell

If you have a short-term or chronic upper GI condition that requires an EGD, don't hesitate to ask your healthcare provider and/or your medical team to explain the results so you understand exactly what's going on with your health.

Frequently Asked Questions

  • Are there side effects after an EGD?

    For up to 24 hours after the procedure, you may have a mild sore throat and some bloating, gas, or slight cramping. Some people also feel nauseated by the anesthesia. If these symptoms last longer than a day, contact your healthcare provider.

  • How soon can you eat or drink after an endoscopy?

    Your healthcare provider will give you specific directions based on your procedure. In most cases, you can return to eating light food shortly after the endoscopy. If you have throat pain or residual effects of local anesthesia, you may need to wait until the pain or numbness passes before you eat.

  • Do they put you to sleep for an upper endoscopy?

    Yes, mild to moderate sedation is used during an EGD procedure in most cases. This prevents complications such as gagging or choking while the endoscope is in the esophagus, as well as anxiety during the procedure. Though you wake up shortly after it's completed, it's also the reason why practitioners ask that someone else drive you home afterwards.

  • What diseases can be detected by an endoscopy?

    An EGD can be used to detect inflammation, swelling, and structural changes like Barrett's esophagus. It is often used to help diagnose gastroesophageal reflux disease (GERD), or to take a biopsy sample if cancer is suspected.

11 Sources
Verywell Health uses only high-quality sources, including peer-reviewed studies, to support the facts within our articles. Read our editorial process to learn more about how we fact-check and keep our content accurate, reliable, and trustworthy.
  1. Aydin M, Niggeschmidt J, Ballauff A, Wirth S, Hensel KO. Common indications and the diagnostic yield of esophagogastroduodenoscopy in children with gastrointestinal distress. Klin Padiatr. 2019;231(1):21-27. doi:10.1055/a-0628-7001.

  2. Lui TK, Tsui VW, Leung WK. Accuracy of artificial intelligence-assisted detection of upper GI lesions: a systematic review and meta-analysis [published online ahead of print, 2020 Jun 17]. Gastrointest Endosc. 2020;S0016-5107(20)34459-X. doi:10.1016/j.gie.2020.06.034.

  3. American Society for Gastrointestinal Endoscopy. Understanding upper endoscopy.

  4. Watanabe J, Ikegami Y, Tsuda A, et al. Lidocaine spray versus viscous lidocaine solution for pharyngeal local anesthesia in upper gastrointestinal endoscopy: systematic review and meta-analysis [published online ahead of print, 2020 Jun 22]Dig Endosc. 2020;10.1111/den.13775. doi:10.1111/den.13775.

  5. Muthusamy VR, Lightdale JR, Acosta RD, et al. The role of endoscopy in the management of GERD. Gastrointest Endosc. 2015;81(6):1305-10. doi:10.1016/j.gie.2015.02.021.

  6. Stier C, Balonov I, Stier R, Chiappetta S, Fuss CT, Dayyeh BA. Endoscopic management of clinically severe obesity: Primary and secondary therapeutic procedures [published online ahead of print, 2020 Jun 3]Curr Obes Rep. 2020;10.1007/s13679-020-00385-y. doi:10.1007/s13679-020-00385-y

  7. Johns Hopkins Medicine. Esophagogastroduodenoscopy (EGD).

  8. American Gastroenterological Association. Upper GI endoscopy.

  9. Medicare. Procedure Price Lookup.

  10. Lin OS. Sedation for routine gastrointestinal endoscopic procedures: a review on efficacy, safety, efficiency, cost and satisfaction. Intest Res. 2017 Oct;15(4):456-466. doi:10.5217/ir.2017.15.4.456. 

  11. National Institute of Diabetes and Digestive and Kidney Diseases. Upper GI Endoscopy.

By Sharon Gillson
 Sharon Gillson is a writer living with and covering GERD and other digestive issues.