A gastroscopy is a test that looks at the inside of your food pipe (oesophagus), stomach and the first part of your small intestine (small bowel).

A doctor or specialist nurse (endoscopist) does the test. They use a long flexible tube which has a tiny camera and light at the end. This tube is called a gastroscope or endoscope. 

You may also hear this test called an endoscopy or oesophago gastric duodenoscopy (OGD).

Diagram of an endoscopy

Why do I need a gastroscopy?

You might have a gastroscopy to find out the cause of symptoms such as:

  • abnormal bleeding
  • indigestion or heartburn that doesn’t go away with medicines or keeps coming back
  • low levels of iron (iron deficiency anaemia)
  • difficulty or painful swallowing
  • losing weight without trying to
  • you keep feeling or being sick
  • having blood in your sick
  • blood in your poo or passing black poo

If you have Barrett's oesophagus you'll have regular gastroscopies. This is to check for any changes to cells in the lining of your food pipe. 

During the test your endoscopist takes samples (biopsies) of any abnormal looking areas. They send the samples to the laboratory to be looked at under a microscope. 

Preparing for your gastroscopy

You might have blood tests beforehand to check your blood levels and how well your blood clots.

Tell your doctor if you're taking medicines that changes how your blood clots. This inlcudes:

  • warfarin or heparin
  • aspirin
  • clopidogrel
  • apixaban or rivaroxaban
  • ticagrelor

Your doctor will tell you if you need to stop taking these or any other medicines for a while before your gastroscopy.

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

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

What happens?

Most people have a gastroscopy as an outpatient, which means you go home the same day. The test usually takes up to about 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 also take measurements such as 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. This is 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 gastroscope 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 gastroscope on a television screen. They may put a small amount of air into the tube to help them see your oesophagus, stomach and duodenum. This might make you feel like burping.

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

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

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 and 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 gastroscope down your throat. 

After your gastroscopy

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

You might have some bloating and discomfort after the gastroscopy. This usually lasts for a few hours. 

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 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

Possible risks

A gastroscopy is a very safe procedure. 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 a gastroscopy 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 gastroscope 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. This is because your throat is 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 gastroscope causing a tear in the lining of your oesophagus, stomach or duodenum. You might need an operation to repair this.

Getting your results

You will get some results before you go home. It takes a little longer for your biopsy results. You should get your biopsy results within 1 to 2 weeks, but it may take longer. The specialist doctor at the hospital might give you your results. Or you might see your GP.

Waiting for test results can be a very worrying time. You might have contact details for a specialist nurse who you can contact for information if you need to. It can help to talk to a close friend or relative about how you feel.

You can also contact the Cancer Research UK information nurses on freephone 0808 800 4040 for information and support. The lines are open from 9am to 5pm, Monday to Friday.

Contact the doctor who arranged the test if you haven’t heard anything after a couple of weeks.

More information

We have more information on tests, treatment and support if you have been diagnosed with cancer.

  • Endoscopy in patients on antiplatelet or anticoagulant therapy: British Society of Gastroenterology (BSG) and European Society of Gastrointestinal Endoscopy (ESGE) guideline update
    A M Veitch and others
    Gut, 2021. Volume 70 , Pages 1611 to 1628

  • Quality standards in upper gastrointestinal endoscopy: a position statement of the British Society of Gastroenterology (BSG) and Association of Upper Gastrointestinal Surgeons of Great Britain and
    Ireland (AUGIS)

    S Bag and others 
    Gut, 2017. Volume 0, Pages 1 to 14

  • The Royal Marsden Manual of Clinical and Cancer Nursing Procedures (10th edition)
    S Lister, J Hofland and H Grafton
    Wiley Blackwell, 2020

  • Cancer: Principles and Practice of Oncology (11th edition)
    V T De Vita, T S Lawrence and S A Rosenberg
    Wolters Kluwer, 2019

  • Suspected cancer: recognition and referral
    National Institute for Health and Care Excellence (NICE), June 2015. Last updated December 2021

  • The information on this page is based on literature searches and specialist checking. We used many references and there are too many to list here. Please contact with details of the particular issue you are interested in if you need additional references for this information.

Last reviewed: 
09 Sep 2022
Next review due: 
09 Sep 2025

Related links