An upper endoscopy, or EGD, uses a thin flexible tube with a camera to examine the inside of the esophagus, stomach, and first part of the small intestine. Doctors often recommend it to investigate symptoms such as ongoing heartburn, abdominal discomfort, nausea, or difficulty swallowing. The procedure usually lasts 15 to 30 minutes and is commonly performed with sedation so most people remain comfortable. Preparation centers on fasting for several hours beforehand so the stomach is empty. Your doctor interprets the findings in the context of your overall health and symptoms.

Key takeaways

  • Upper endoscopy (EGD) allows a doctor to view the lining of the esophagus, stomach, and duodenum and, when needed, take tissue samples or perform simple treatments.
  • Most people receive sedation and the procedure itself is typically brief; an empty stomach is essential for clear views and safety.
  • A responsible adult must drive you home after sedation, and reaction times may remain affected for the rest of the day.
  • Common temporary effects include a mild sore throat or bloating; serious complications are uncommon.
  • Results are interpreted by your doctor together with your symptoms, history, and any other tests—never in isolation.
  • Always follow the specific written instructions given by your endoscopy team, as details can vary.

Why doctors recommend upper endoscopy

Doctors turn to upper endoscopy when symptoms or other findings raise questions about the upper digestive tract. According to Mayo Clinic, the procedure can help investigate persistent heartburn, nausea, vomiting, abdominal pain, difficulty swallowing, or signs of gastrointestinal bleeding. It also allows the collection of small tissue samples (biopsies) that can be examined under a microscope.

In some situations the same procedure can treat a problem at the same time it is found. Narrowed areas of the esophagus may be gently stretched, bleeding spots can be treated, small growths can be removed, or a foreign object can be retrieved. The test is therefore both diagnostic and, when appropriate, therapeutic. More information about specific symptom-related uses appears in our guides on upper endoscopy for heartburn, GERD and Barrett’s and upper endoscopy for difficulty swallowing.

Your doctor will consider your full medical history, current medications, and any previous test results before recommending the procedure. An abnormal finding on endoscopy is a piece of information, not a diagnosis on its own. Only a qualified clinician can place the results in the proper clinical context.

Preparing for the procedure

Preparation is straightforward but important. The main requirement is an empty stomach so the lining can be seen clearly and the risk of aspiration is reduced. NIDDK notes that most people are asked not to eat or drink for up to eight hours before the procedure; exact timing is given by your care team and may differ slightly for morning versus afternoon appointments.

You will also be asked to review all medicines, vitamins, and supplements with the endoscopy team. Blood-thinning medicines and certain diabetes medicines often need temporary adjustment. Never stop or change a prescribed medicine without direct instruction from a clinician who knows your medical history. Detailed step-by-step guidance is available in our article on how to prepare for an upper endoscopy.

Because sedation is commonly used, arrange for a responsible adult to accompany you and drive you home. Public transport or rideshares alone are usually not considered sufficient after sedation. Wear comfortable clothing and leave jewelry and valuables at home. If you wear dentures or have removable dental work, you will be asked to remove them just before the procedure begins.

Tell the team about any allergies, previous reactions to sedatives, pregnancy (or possible pregnancy), and all current health conditions, especially heart, lung, or kidney problems. This information helps the team choose the safest approach for you.

Sedation options and staying comfortable

Most upper endoscopies are performed with conscious (moderate) sedation given through an intravenous line. The medicine helps you feel relaxed and drowsy; many people do not remember the procedure afterward. A local anesthetic spray or gel may also be applied to the throat to reduce the gag reflex. In selected cases deeper sedation or general anesthesia is used. Your team will discuss the options that suit your health and preferences. Further details appear in our page on sedation for upper endoscopy.

Throughout the procedure your breathing, heart rate, blood pressure, and oxygen level are continuously monitored. The endoscope itself does not interfere with breathing. You will usually lie on your left side. A soft mouth guard protects your teeth and the instrument. The sensation of air being introduced to open the stomach can create temporary fullness, but the procedure is not expected to be painful.

What happens during the endoscopy

Once you are comfortable, the gastroenterologist gently guides the thin, flexible endoscope through the mouth, down the esophagus, into the stomach, and then into the duodenum. A camera at the tip sends real-time images to a video monitor. Air is carefully introduced to expand the walls so the lining can be examined thoroughly. The entire examination typically lasts 15 to 30 minutes, although additional time may be needed if biopsies or treatments are performed.

According to Cleveland Clinic, the doctor can take tiny tissue samples, treat bleeding, remove small polyps, or dilate a narrowed segment through channels in the endoscope. These actions add only a few minutes in most cases. A fuller walk-through of the room experience is provided in what happens during an upper endoscopy.

When the examination is complete, the air is suctioned out as much as possible and the endoscope is withdrawn. You are then moved to a recovery area while the effects of sedation begin to lessen.

Recovery and going home

Most people stay in the recovery area for 30 to 60 minutes until they are alert enough to leave with their companion. Temporary effects commonly include a mild sore throat, a feeling of bloating, or the need to pass gas. These sensations usually improve within a day. Cold drinks or soft foods can soothe the throat once the numbing spray has worn off and swallowing feels normal again.

MedlinePlus advises that reaction times, memory, and judgment can remain impaired for the rest of the day after sedation. You should not drive, operate machinery, make important decisions, or drink alcohol for 24 hours. Plan to rest and have someone stay with you. Specific after-care instructions, including when to restart regular medicines and diet, will be given in writing before you leave. Our dedicated recovery guide covers practical tips in more detail: recovery after upper endoscopy.

Many people return to normal activities the following day, provided they feel well. If biopsies were taken, those results often take several days to a week or more to return and will be discussed at a follow-up appointment or by telephone.

Possible findings and follow-up

Upper endoscopy can identify inflammation, ulcers, narrowing, abnormal tissue, or sources of bleeding. Tissue samples help distinguish between different causes of similar-looking changes. Findings are always interpreted alongside your symptoms, physical examination, laboratory results, and medical history. A single endoscopic appearance does not automatically equal a specific diagnosis.

If the procedure was performed for black stools or vomiting blood, the team will look carefully for a bleeding source and treat it when possible; see our related article on upper endoscopy for black stools or vomiting blood. Similarly, when the test is ordered for unexplained nausea, weight loss, or anemia, the findings help narrow the list of possible explanations: upper endoscopy for nausea, vomiting, weight loss or anemia.

Your doctor will explain what was seen, whether any samples were taken, and what the next steps may be. These steps might include medication adjustments, lifestyle measures, further testing, or simply watchful waiting. Decisions are individualized; the same finding can lead to different plans for different people.

Understanding safety and rare risks

Upper endoscopy is regarded as a low-risk procedure when performed by trained clinicians in an appropriate setting. According to Mayo Clinic, rare complications can include bleeding (more likely if a biopsy or treatment is performed), a reaction to the sedative, infection, or a tear in the lining of the digestive tract. The risk of a tear during a purely diagnostic examination is very low.

Your team reduces risk by reviewing your health history, following fasting rules, monitoring you continuously, and using sterile equipment. Most people experience only minor, short-lived side effects. A separate page summarizes the safety profile in greater depth: risks and safety of upper endoscopy.

If alternatives to endoscopy are being considered, such as imaging studies or empiric therapy, those options can be discussed with your doctor. Information on other approaches is available in alternatives to upper endoscopy.

When to contact your care team

After the procedure, contact the endoscopy unit or seek urgent medical attention if you develop severe or worsening abdominal pain, persistent vomiting, vomiting of blood or material that looks like coffee grounds, black or bloody stools, fever, chest pain, shortness of breath, or difficulty swallowing that is new or progressive. These symptoms are uncommon but warrant prompt evaluation.

Mild sore throat, temporary bloating, or a small amount of blood-streaked saliva right after the test are usually not cause for alarm and improve on their own. When in doubt, it is always appropriate to telephone the number provided on your discharge instructions. Your care team is the best source of personalized advice.

Remember that this article provides general educational information only. It cannot replace a conversation with a qualified healthcare professional who knows your individual circumstances. If you have questions about whether an upper endoscopy is right for you, or about the meaning of any results, schedule a discussion with your doctor.

Related articles

These focused guides explore specific aspects of upper endoscopy in more detail and can help you prepare for conversations with your care team.