Upper Endoscopy

An upper endoscopy is used to look at the upper part of the digestive tract to find the cause of symptoms such as pain, trouble swallowing, or bleeding. For some people at high risk of cancer, this test may be recommended even without symptoms to catch problems early and treat them.

A gastroenterologist, a specialist in the digestive system, often performs the procedure.

What is an upper endoscopy?

An upper endoscopy is a procedure used to look at the inside of the upper digestive tract (the esophagus, stomach, and duodenum, which is the first part of the small intestine). This test is also called an esophagogastroduodenoscopy (EGD).

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

The images from the camera are viewed on a video monitor. Special tools can be passed through the endoscope to take samples or treat problems, if needed.

Why might you need an upper endoscopy?

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

Check for upper digestive system problems

This test can be used to look for the causes of problems in the upper digestive tract. It might be done because of symptoms you are having. This includes things such as:

  • Pain
  • Trouble swallowing (dysphagia)
  • Heartburn (reflux)
  • Ongoing nausea and vomiting
  • Bleeding

It also might be done to look at an abnormal area seen on an imaging test, such as an x-ray or CT scan.

Take tissue samples (biopsy)

Upper endoscopy can be used to take small tissue samples (biopsies) to check for cancer or other problems. The samples are collected by passing special tools through the endoscope and then looking at them under a microscope in the lab.

Treat upper digestive system problems

Upper endoscopy can be used to treat blockages and other digestive tract problems. For example, a small laser on the endoscope can remove part of a tumor blocking the passage of food, or the endoscope can be used to stretch (dilate) a narrow area followed by placement of a hard tube (stent) to help keep the area open.

Upper endoscopy as part of other tests

Upper endoscopies may be done as part of other tests such as ultrasounds or x-rays.

Endoscopic ultrasounds

Upper endoscopy can be combined with ultrasound (endoscopic ultrasound) to look at the wall of the digestive tract and other areas, such as lymph nodes and nearby organs. For cancer, this can help show how deep a tumor has grown and whether it may have spread.

It can also be used to look at the pancreas, gallbladder, or bile ducts from the small intestine.

For this test, the endoscope is fitted with a small ultrasound probe on its tip. The ultrasound uses sound waves to create pictures of nearby tissues on a computer screen. If an abnormal area is seen, a hollow needle can be passed through the endoscope into these areas to take a biopsy.

ERCP

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

For an ERCP, an endoscope is passed into the first part of the small intestine. A small catheter (tube) is then put through the endoscope and into the common bile duct. From there, a small amount of contrast dye is injected that helps outline the bile and pancreatic ducts on x-rays. This helps see any blockages and tissue or fluid samples can be collected, if needed.

What’s it like to have an upper endoscopy?

This is a general outline of what often 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 doctor before having this test so you understand what to expect. Ask questions if there’s anything you’re not sure about.

Before your upper endoscopy

Be sure your doctor 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, for several days before the test to reduce the risk of bleeding. Your doctor may also ask you to adjust or stop other medicines as well, such as those for diabetes. If you normally take prescription medicines in the morning, talk with your doctor or nurse about how to manage them on the day of your test.

You will be told not to eat or drink anything for up to 8 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 procedure, you will need to arrange for a ride home after the test.

You might be sleepy or dizzy and need someone to help you get safely into your home, so a cab or a rideshare service may not be a good option. Some centers will not allow you to use a cab or rideshare after this procedure.

If transportation home might be a problem, talk with your health care provider. There might be other resources available, depending on the situation.

During your upper endoscopy

Upper endoscopy can usually be done as an outpatient procedure, where you don’t need to stay overnight in a hospital. Your doctor will review the procedure with you and ask you to sign a consent form.

If you wear dentures, you may be asked to remove them. For this test, you lie on your left side (most often) or back on an exam table.

From there:

  • Your blood pressure, heart rate, and breathing will be monitored.
  • Your mouth and throat may be numbed with a spray or liquid.
  • You might get a sedative through an intravenous (IV) line to help you relax, or less often, be asleep (under general anesthesia) for the test.
  • A plastic mouthpiece might be used to keep your mouth open and protect your teeth.

The scope will then be passed down your throat, but it won’t affect your breathing. Air may be added to help the doctor see. Once the scope is in place, the doctor might take biopsies or treat any narrowed or blocked areas.

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

After your upper endoscopy

After the procedure, you’ll be watched closely for any problems. If you had a sedative, you might not remember the procedure.

If you had the procedure as an outpatient, you should be able to go home after a few hours. If you were given a sedative, someone will need to drive you home and stay with you until it wears off. Your doctor or nurse will give you specific instructions to follow after the test, including when to start taking medicines again that might have been stopped for the procedure.

You may feel bloated or crampy from the air used during the test. Your mouth and throat may be numb afterward, so you won't be allowed to eat or drink right away. Once the numbness wears off, you might have a sore throat, cough, or hoarseness for a day or so.

If biopsies were taken, results are usually ready 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 risks of upper endoscopy

Upper endoscopy is usually safe, but there is a small risk of certain complications.

Bleeding: If a biopsy was done, a small amount of bleeding could happen where the doctor removed tissue samples.

Perforation (puncture of the wall of the esophagus, stomach, or intestine): This is rare, but it can be a life-threatening complication, and the hole may need to be repaired with surgery.

Drug reactions: Sometimes the drugs used to help you relax and stay comfortable during the test can cause changes in blood pressure, confusion, dizziness, or even an allergic reaction. You will be watched closely for any medicine side effects, and they will be treated, if needed.

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. In general, these include:

  • Severe abdominal (belly), throat, or chest pain
  • Swelling or distention in your belly that lasts after a few days
  • Vomiting
  • Fever
  • Trouble swallowing
  • Signs of bleeding, including dark or black stools

Be sure you understand what you should watch out for, the possible timing of when problems might occur, and when you should call for problems.

side by side logos for American Cancer Society and American Society of Clinical Oncology

Developed by the American Cancer Society medical and editorial content team with medical review and contribution by the American Society of Clinical Oncology (ASCO).

Ahlawat R, Hoilat GJ, & Ross AB. Esophagogastroduodenoscopy. Updated August 8 2023. In: StatPearls [Internet]. Treasure Island (FL): StatPearls Publishing; 2025 Jan- Accessed https://www.ncbi.nlm.nih.gov/books/NBK532268/ on January 22, 2026.

American Society of Clinical Oncology (ASCO). Upper endoscopy. Accessed from www.cancer.net. Content no longer available.

American Society for Gastrointestinal Endoscopy. Upper Endoscopy. Accessed at https://www.asge.org/home/for-patients/patient-information/understanding-upper-endoscopy on January 22, 2026.

Cohen J, Greenwald, DA. Overview of upper gastrointestinal endoscopy (esophagogastroduodenoscopy). UpToDate. 2025. Accessed at https://www.uptodate.com/contents/overview-of-upper-gastrointestinal-endoscopy-esophagogastroduodenoscopy on January 22, 2026.

Liang J, Jiang Y, Abboud Y, & Gaddam S. Role of endoscopy in management of upper gastrointestinal cancers. Diseases. 2023; 11(1), 3. Accessed from https://www.mdpi.com/2079-9721/11/1/3 on January 22, 2026.

National Institute of Diabetes and Digestive and Kidney Diseases. Upper GI Endoscopy. Updated October 2023. Accessed at https://www.niddk.nih.gov/health-information/diagnostic-tests/upper-gi-endoscopy on January 22, 2026.

Last Revised: February 3, 2026

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.