Upper endoscopy preparation
Informed by recognized medical guidance
Overview
An upper endoscopy is a test where a doctor uses a thin, flexible tube with a tiny camera to look inside your oesophagus (food pipe), stomach, and the first part of your small intestine. It helps find problems like ulcers, inflammation, or bleeding.
Key facts
- You will need to stop eating and drinking for several hours before the test, usually from midnight the night before.
- The doctor may give you a sedative to help you relax during the procedure.
- The test usually takes about 15 to 30 minutes, and you can go home the same day.
Yes, upper endoscopy is a common procedure done in hospitals and clinics around the world.
It is used for people of all ages who have symptoms like persistent heartburn, stomach pain, nausea, vomiting, or difficulty swallowing.
Symptoms
- Vomiting large amounts of blood or passing large amounts of black, tarry stool.
- Severe abdominal pain that comes on suddenly and does not go away.
- Chest pain that feels like a heart attack (call your local emergency number immediately).
- ⚠Vomiting blood, even a small amount.
- ⚠Having black, tarry stools or blood in your stool.
- ⚠Difficulty swallowing that makes it hard to drink fluids or keep them down.
- ⚠Severe, persistent abdominal pain that is not relieved by rest or over-the-counter medicines.
Common symptoms
- Persistent heartburn or acid reflux that does not improve with lifestyle changes or over-the-counter medicines.
- Unexplained upper abdominal pain or discomfort.
- Trouble swallowing or pain when swallowing.
- Nausea or vomiting that lasts for weeks.
- Feeling full quickly after eating small amounts.
- Vomiting blood or having black, tarry stools (signs of bleeding in the digestive tract).
Symptoms in children
- Ongoing vomiting or spitting up that is forceful or contains blood.
- Poor weight gain or growth.
- Unexplained stomach pain that keeps coming back.
- Difficulty swallowing or choking on food.
Symptoms in older adults
- Anaemia (low red blood cells) with no obvious cause.
- Unintentional weight loss along with digestive symptoms.
- New or worsening trouble swallowing.
- Bleeding from the digestive tract, which may show as black stools or vomiting blood.
Causes
Main causes
- The procedure is done to find the cause of symptoms like ongoing heartburn, stomach pain, or bleeding.
- Common conditions found include gastroesophageal reflux disease (GERD), stomach ulcers, inflammation of the stomach lining (gastritis), or celiac disease.
- It may also be used to check for abnormal growths, such as polyps or tumours.
Risk factors
- Having chronic acid reflux (GERD).
- Taking certain pain medicines called non-steroidal anti-inflammatory drugs (NSAIDs) for a long time.
- Being infected with H. pylori bacteria.
- Having a family history of stomach cancer or other digestive cancers.
- Being over the age of 50, as the risk of stomach conditions increases.
When to see a doctor
See a doctor urgently if:
- If you are vomiting blood or have black, tarry stools, contact your doctor or go to the emergency room immediately.
- If you have severe abdominal pain that comes on suddenly and does not get better.
Book a routine appointment if:
- If you have had heartburn, indigestion, or stomach discomfort for several weeks that does not improve with over-the-counter remedies.
- If you have trouble swallowing or feel like food is getting stuck in your chest.
Diagnosis
The diagnosis of conditions affecting the upper digestive tract often starts with a discussion of your symptoms and a physical exam. If your doctor suspects a problem, they may recommend an upper endoscopy as the best way to see inside your digestive system directly.
Tests that may be done
- Upper endoscopy (oesophagogastroduodenoscopy – EGD) – the main test.
- Sometimes a small sample of tissue (biopsy) is taken during the endoscopy to check for inflammation, infection, or abnormal cells.
- If needed, other tests like a barium swallow X-ray or a pH test for acid reflux may be done before or after the endoscopy.
What to expect at your appointment
Before the endoscopy, you will be asked to stop eating and drinking for several hours. You may receive a sedative to help you relax. The doctor will gently insert the endoscope through your mouth and guide it down your throat while you are lying on your side. You might feel some pressure but it should not be painful. The test takes about 15 to 30 minutes. Afterward, you will rest in a recovery area until the sedative wears off. You will need someone to drive you home because the sedative can make you drowsy.
Treatment
Treatment depends on what the endoscopy finds. If the test reveals a condition such as a stomach ulcer, inflammation, or a precancerous growth, your doctor will talk to you about the best treatment plan. This plan may include lifestyle changes, medicine, or, in rare cases, surgery.
Self-care at home
- Before the endoscopy, follow all preparation instructions exactly, especially about not eating or drinking.
- After the test, rest for the remainder of the day. Do not drive or operate machinery until the next day.
- You may have a mild sore throat – drinking cool liquids or sucking on ice chips can help.
Medical treatments
If ulcers or inflammation are found, doctors often prescribe medicines that reduce stomach acid. These might include proton pump inhibitors (PPIs) or H2 blockers. If an infection like H. pylori is found, a course of antibiotics will be given. If abnormal growths or early cancer are discovered, they may be removed during the endoscopy or require further treatment like surgery or chemotherapy. Your healthcare team will discuss the specific options with you.
When is surgery considered?
Surgery is rarely needed for conditions found during an upper endoscopy. It may be considered for large bleeding ulcers that do not stop bleeding, for removing large polyps that cannot be removed during endoscopy, or for early-stage stomach cancer.
Living with this condition
After an upper endoscopy, most people go back to their normal routine the next day. If you had a biopsy or if a condition was found, your doctor will give you guidance on what to do next. Follow any treatment plan and attend follow-up appointments as recommended.
Lifestyle tips
- If you have acid reflux or heartburn, avoid eating large meals late at night, and try not to lie down right after eating.
- Limit foods that trigger your symptoms, such as spicy, fatty, or acidic foods.
- Quit smoking if you smoke, as it can worsen many digestive conditions.
- Manage stress with relaxation techniques like deep breathing or gentle exercise.
Diet and exercise
After the endoscopy, you may be advised to eat light, soft foods for the first few hours until your throat feels normal. In the long term, a balanced diet rich in fruits, vegetables, and whole grains can support digestive health. Regular, moderate exercise can also help with digestion and overall well-being.
Mental health and emotional wellbeing
Waiting for a test result or dealing with a digestive condition can cause anxiety or worry. It is normal to feel concerned. Talk to your doctor about your fears, and consider speaking with a counsellor if you need extra support. Remember that most conditions found during an upper endoscopy are treatable.
Prevention
While you cannot always prevent conditions that need an endoscopy, you can lower your risk by maintaining a healthy weight, not smoking, limiting alcohol, and avoiding long-term use of certain pain medicines without medical supervision.
Screening programmes
Routine screening upper endoscopy is not recommended for everyone. However, if you have a strong family history of stomach cancer or certain genetic conditions, your doctor may suggest periodic endoscopies to check for early signs. Talk to your healthcare provider about whether screening is right for you.
Complications
If left untreated
- If the underlying problem (like a bleeding ulcer or early cancer) is not treated, it can worsen over time.
- Untreated infections such as H. pylori can lead to chronic inflammation and increase the risk of stomach ulcers or stomach cancer.
- Severe narrowing of the oesophagus (stricture) can make swallowing increasingly difficult.
Long-term outlook
Upper endoscopy is a safe and very common procedure. Most conditions found can be successfully treated, especially when caught early. With proper care, the outlook for most digestive problems is very good. Your healthcare team will guide you through every step.
Find support
External links open third-party websites. Ruqelo Health is not responsible for external content. Listing an organisation does not imply endorsement.
Always verify with your doctor
Health guidelines vary by country and region. The information in this article is based on international clinical guidelines but may not reflect the specific guidelines, medications, or practices in your country. Always discuss your health concerns with your own doctor or healthcare provider, and refer to your local national health guidelines where available.
Important notice This information is for educational purposes only. It does not replace professional medical advice, diagnosis, or treatment. Always consult a qualified healthcare provider about your specific situation. If you are experiencing a medical emergency, call your local emergency services immediately.
Related conditions
Sources and guidance
This article is educational and is prepared with reference to recognized health information and clinical guidance sources where available. Specific source links may vary by topic.
Last updated: July 16, 2026
Educational note: This information is for education only and is not a diagnosis.
Use it to support, not replace, advice from a licensed clinician.
If symptoms are severe, worsening, or urgent, call your local emergency number or seek emergency care.
Guidance may differ by country or region. Confirm local recommendations with a qualified healthcare provider.