An endoscopy is a test to look inside your body. Doctors can use it to diagnose oesophageal cancer.

This page is about having an endoscopy of your:

  • oesophagus
  • stomach
  • small bowel (duodenum)

This is also called a gastroscopy or oesophagho gastric duodenoscopy (OGD).

The doctor uses a long flexible tube (endoscope) with a tiny camera and light on the end to look inside your oesophagus. They check the oesophagus for growths or abnormal looking areas.

They can also take samples (biopsies) of any abnormal looking tissues and send them to the laboratory to examine under a microscope.

Diagram of an endoscopy

Preparing for your test

You might have a blood test 2 days beforehand to check how well your blood clots.

Tell your doctor if you're having medicine that changes how your blood clots. This includes:

  • aspirin
  • clopidogrel
  • arthritis medicines
  • warfarin or heparin
  • apixaban or rivaroxaban

Your doctor tells you if you need to stop taking any other medicines.

You can't eat for 6 to 8 hours before the test but you might be able to drink sips of water up to 2 hours before your appointment. Your doctor or nurse gives you written instructions about this beforehand.

Talk to your doctor if not eating could be a problem for you. For example, if you have diabetes.

Your doctor will explain what they are going to do and you’ll sign a consent form. This is a good time to ask any questions you might have.

What happens

Most people have an endoscopy as an outpatient, which means you go home the same day. The test takes up to 15 minutes. But expect to be in the hospital for several hours.

First you meet your nurse who asks you about your medical history and any allergies you might have. They may check your blood pressure and heart rate.

Your nurse or endoscopist explains the procedure and asks you to sign a consent form. This is a good time to ask any questions you might have.

Some endoscopy units may ask you to change into a hospital gown, but you can usually have the test in your own clothes.

Usually you’re awake when you have the test, but you can choose to have medicine to relax you. These make you drowsy (sedation).

If you have any false teeth or wear glasses you need to remove them for the test. Your nurse puts a plastic guard in your mouth to protect your teeth from the gastroscope.

This animation shows how you have an endoscopy, it lasts for 1 minute 19 seconds.

Having the test awake

Your endoscopist sprays the back of your throat with local anaesthetic to numb it and make it easier to swallow the tube. This may make you cough, your eyes may water and it may taste bitter.

You then lie on your left side.

It takes a few minutes for your throat to go numb. Your endoscopist passes the endoscope into your mouth and down your throat to the oesophagus. The tube is slightly bigger than a pen and will be uncomfortable but shouldn’t be painful.

They ask you to swallow as the tube goes down. They can see the images from the endoscope on a television screen. They may put a small amount of air into the tube to help them see your oesophagus, stomach and duodenum. 

Your endoscopist takes samples (biopsies) through the endoscope of any abnormal areas. This shouldn’t be painful.

At the end of the test, your endoscopist gently removes the endoscope.

Having the test while drowsy

You lie down on the couch.

Your nurse puts a small plastic tube (a cannula) into a vein in your arm. They then inject the sedative into the cannula. It takes a few minutes for you to get more relaxed, this makes you drowsy. You are still able to follow instructions from your endoscopist and nurse.

They give you oxygen through a small plastic tube with prongs that sit just inside your nostrils. They also put a clip on your finger to check your oxygen levels and heart rate. 

Your endoscopist then passes the endoscope down your throat. 

Having an ultrasound

During the test they might ultrasound the wall of your oesophagus. The endoscope has an ultrasound probe at its tip. The probe uses sound waves to build up a picture so they can measure any tumour and see how deeply it's grown into the tissues. They may also be able to see whether nearby lymph nodes are swollen (enlarged).

After your test

Your nurse or endoscopist will talk to you about how the test went, if they took any biopsies and when to expect the results.

You might have some bloating and discomfort lasting a few hours after the endoscopy. 

If you haven’t had sedation, you can usually go home shortly after having the test. You won't be able to eat or drink until the local anaesthetic spray has worn off. This takes about an hour.

If you had sedation, you stay in the endoscopy unit for an hour or two to recover. You may not remember much (if anything) about the test. You'll need a friend or relative to take you home and stay overnight.

For 24 hours after having sedation, you shouldn't:

  • drive
  • drink alcohol
  • operate heavy machinery
  • sign any important documents

Getting your results

You should get your results within 1 to 2 weeks. The specialist doctor at the hospital usually gives you your results. Or you might see your GP.

Waiting for results can make you anxious. You can ask your doctor or nurse how long it will take to get the results. Contact the doctor who arranged the test if you haven't heard anything after a couple of weeks.

Possible risks

Endoscopy is a very safe procedure but your nurse will tell you who to contact if you have any problems after the test. Your doctor will make sure the benefits of having an endoscopy outweigh the possible risks.

Some of the risks include:


If you have a biopsy you may have a small amount of bleeding. This usually stops on its own. If it doesn’t you might need to go into hospital to stop the bleeding.

Sore throat

This is common after having an endoscopy and lasts a few days. Contact the hospital if you have severe pain in your throat, chest or tummy (abdomen).


There is a very small risk that after a biopsy the wound can become infected. If you have a temperature, feel hot and cold or shivery, or feel generally unwell, you should contact your GP.

Damage to teeth

There’s a small chance the endoscope can damage your teeth during the test. The mouth guard helps prevent this from happening.

Chest infection

There’s a small risk of breathing in spit (secretions) that you would normally swallow, due to your throat being numb or from the sedation making you sleepy. Your nurse protects your airway by suctioning away any secretions during the procedure. 

Reaction to the sedation

Occasionally sedation can cause problems with your breathing, heart rate and blood pressure. The risks are higher in older people and those with lung or heart problems. Your nurse closely watches you for any problems during the test, so they can treat it quickly.

Tear or hole (perforation)

There’s a very small risk of the endoscope causing a tear in the lining of your oesophagus, stomach or duodenum. You might need an operation to repair this.

Last reviewed: 
18 Sep 2019
  • The Royal Marsden Manual of Clinical Nursing Procedures (9th Edition )
    L Dougherty and S Lister (Editors) (Royal Marsden Manual Series) Wiley-Blackwell, 2015

  • Referral Guidelines for suspected cancer
    National Institute for Health and Care Excellence (NICE), June 2015

Related links