Skip to main content

LIMITED TIME OFFER! Give now and have your gift 3X matched, up to $75,000. Donate Now.

showDesktop,showTablet,showMobile

Upper Endoscopy

What is an upper endoscopy?

An upper endoscopy is a procedure a doctor uses to look at the inner lining of the upper digestive tract (the esophagus, stomach, and duodenum, which is the first part of the small intestine).

This test is also sometimes called an esophagogastroduodenoscopy, or EGD.

This procedure is done with an endoscope, a thin, flexible tube with a light and a small video camera on the end. The tube is put in through your mouth, down your throat, and into your esophagus, stomach, and small intestine.

Why do you need an upper endoscopy?

There are a few reasons you might need an upper endoscopy:

You are having problems in your upper digestive tract

This test can be used to look for the causes of problems in the esophagus, stomach, or duodenum. It might be done because of symptoms you are having (such as trouble swallowing, heartburn, feeling full quickly, or coughing up or vomiting blood). Or it might be done to look at an abnormal area seen on an imaging test (such as an x-ray or CT scan).

Upper endoscopy can be done as part of an endoscopic ultrasound to look at the wall of the digestive tract, as well as for nearby lymph nodes and other structures just outside the digestive tract. For example, if there is a tumor in the wall of the esophagus or stomach, ultrasound can show how far it has grown into (or through) the wall, and if it might have reached the nearby lymph nodes. From the small intestine, endoscopic ultrasound can also be used to look at the pancreas, gallbladder, or bile ducts.

For this test, an endoscope is fitted with a small ultrasound probe on its tip. It is passed down into the digestive tract and can be pointed in different directions to look at the wall and nearby lymph nodes and other structures. The ultrasound gives off sound waves and picks up the echoes as they bounce off these structures, and the echoes are converted into an image on a computer screen. If suspicious areas such as enlarged lymph nodes are seen, a hollow needle can be passed through the endoscope into these areas to obtain a biopsy.

Upper endoscopy can be used along with x-rays to look at (and sometimes treat problems in) the pancreas and bile ducts. This type of procedure is known as endoscopic retrograde cholangiopancreatography (ERCP).

For this test, a doctor passes an endoscope down into the first part of the small intestine. A small catheter (tube) is then put through the endoscope and into the common bile duct, and a small amount of contrast dye is injected through the catheter. The dye helps outline the bile and pancreatic ducts as x-rays are taken, and can show if there are blockages. The doctor can also take biopsy samples of tissue or fluid during an ERCP.

You have a suspicious area that might be cancer

Upper endoscopy can be used to take biopsy samples of the esophagus, stomach, or small intestine (to find out if an abnormal area is cancer, for example). This is done by passing long, thin instruments, such as small forceps (pincers), down through the middle of the endoscope to collect the samples. The samples are then looked at in the lab.

You have a digestive system problem that needs to be treated

Upper endoscopy can be used to treat a blocked part of the digestive tract or some other types of problems. For example, a small laser put on the end of an endoscope can be used to burn away part of a tumor that is blocking the passage of food. Or an endoscope can be used to place a rigid tube called a stent into a part of the digestive tract to help keep it open.

What’s it like to have an upper endoscopy?

This is a general outline of what typically happens before, during, and after an upper endoscopy. But your experience might be a little different, depending on why you’re having the test, where you’re having the test done, and your overall health. Be sure to talk to your health care provider before having this test so you understand what to expect, and ask questions if there’s anything you’re not sure about.

Before the test

Be sure your health care provider knows about any medicines you are taking, including vitamins, herbs, and supplements, as well as if you have allergies to any medicines.

You may be asked to stop taking blood-thinning medicines (including aspirin) or some other medicines for several days before the test. You will likely be told not to eat or drink anything for at least several hours before the procedure. Your doctor or nurse will give you specific instructions. Be sure to follow them, and to ask questions if there’s anything you don’t understand.

Because a sedative is used to help keep you more comfortable during the test, you will most likely need to arrange for a ride home after the test. You might need someone to help you get home if you are sleepy or dizzy, so many centers will not discharge people to go home in a cab or a ridesharing service. If transportation might be a problem, talk with your health care provider about the policy at your hospital or surgery center for using one of these services. There may be other resources available for getting home, depending on the situation.

Getting the test

Upper endoscopy can usually be done as an outpatient procedure (where you don’t need to stay overnight in a hospital).

For this test, you’ll lie on your side or back on an exam table. Your mouth and throat might be sprayed first with a numbing medicine, or you might get a liquid medicine and be asked to gargle with it. You might also be given a sedative through an intravenous (IV) line to make you feel relaxed. Less often, you might be asleep (under general anesthesia) for the test. You might get a mouthpiece to hold your mouth open during the procedure. The scope will then be passed down through your throat, but it won’t affect your breathing. Air is often put into the stomach through the scope to make it easier to see.

The procedure usually takes about 15 to 30 minutes, but it might take longer, depending on what’s being done.

After the test

After the procedure, you will be watched closely to make sure you don’t have any complications. If you got a sedative, you might not remember the procedure.

Because air is often put into your stomach as part of the procedure, you might feel bloated or crampy afterward.

Your mouth and throat will probably be numb for a couple of hours. You won't be allowed to eat or drink until the numbness wears off. Once the numbness is gone, you may have a sore throat, cough, or hoarseness for the next day or so.

If you had the procedure as an outpatient, you will probably be able to go home after a few hours, but you will likely need a ride home because of the medicines or anesthesia you received. Your doctor or nurse should give you specific instructions on what you can and can’t do in the hours after the test.

If biopsies were done as part of the procedure, the results will typically be available within a few days, although some tests on the biopsy samples might take longer. You will need to follow up with your doctor after the procedure to get your results.

Possible complications of upper endoscopy

Upper endoscopy is usually safe, but there is a small risk of:

  • Bleeding from a place where the doctor removed tissue samples
  • Perforation (puncture) of the lining of the digestive tract
  • Reactions to anesthesia

Bleeding is often minor and goes away on its own, but if not, it might need to be treated. Surgery might be needed to fix a perforation.

Before you go home, your doctor or nurse should give you specific instructions on when you might need to call the doctor’s office for problems. Be sure you understand when you should call.

The American Cancer Society medical and editorial content team

Our team is made up of doctors and oncology certified nurses with deep knowledge of cancer care as well as editors and translators with extensive experience in medical writing.

American Society for Gastrointestinal Endoscopy. Understanding Upper Endoscopy. Accessed at https://www.asge.org/home/for-patients/patient-information/understanding-upper-endoscopy on November 27, 2018.

National Institute of Diabetes and Digestive and Kidney Diseases. Upper GI Endoscopy. 2017. Accessed at https://www.niddk.nih.gov/health-information/diagnostic-tests/upper-gi-endoscopy on November 27, 2018.

Last Revised: January 14, 2019

American Cancer Society Emails

Sign up to stay up-to-date with news, valuable information, and ways to get involved with the American Cancer Society.