An upper endoscopy is a procedure where a doctor uses a thin, flexible tube with a camera to look inside your esophagus, stomach, and the first part of your small intestine. It is also called an esophagogastroduodenoscopy, or EGD. You would need one if you have symptoms like persistent heartburn, trouble swallowing, stomach pain, or bleeding that does not go away with other treatments.
The procedure usually takes 15 to 30 minutes. You are sedated, so you feel relaxed and usually remember little of it. The camera sends live images to a screen, letting the doctor see inflammation, ulcers, tumors, or other problems directly. The doctor can also take small tissue samples, called biopsies, during the same procedure.
What Exactly Happens During An Upper Endoscopy?
You lie on your left side. Your throat is sprayed with a numbing medicine. Then you receive sedation through an IV, usually a combination of a sedative and a pain medicine. The doctor gently guides the endoscope through your mouth, down your esophagus, and into your stomach and duodenum.
The scope is about the thickness of a finger. It does not block your breathing. Air is pumped through it to open the digestive tract so the camera has a clear view. That air can cause mild bloating or pressure, but it passes quickly.
Most people feel nothing during the procedure. The sedation makes you drowsy and relaxed. You will not be fully asleep unless the doctor uses deeper anesthesia, which some practices do. Either way, you should not feel pain.
What Conditions Can An Upper Endoscopy Detect?
An upper endoscopy is one of the most direct ways to see what is happening inside your upper digestive tract. It can confirm or rule out several conditions.
- Gastroesophageal reflux disease (GERD) — inflammation of the esophagus from stomach acid backing up.
- Esophagitis — irritation or swelling of the esophagus, which can come from acid, allergies, or infection.
- Barrett’s esophagus — a change in the lining of the esophagus linked to long-term acid reflux. It raises the risk of esophageal cancer.
- Peptic ulcers — open sores in the stomach lining or the duodenum, often caused by H. pylori bacteria or NSAID pain relievers.
- Gastritis — inflammation of the stomach lining.
- Celiac disease — a biopsy from the small intestine can confirm this immune reaction to gluten.
- Stomach or esophageal cancer — the procedure can spot tumors early, though most people having an endoscopy do not have cancer.
The procedure is also used to find the source of bleeding. If you vomit blood or pass black, tarry stools, an endoscopy can locate the bleeding site and sometimes treat it immediately.
What Are The Main Reasons A Doctor Would Order One?
Doctors do not order an upper endoscopy for mild or occasional symptoms. They order it when symptoms are persistent, severe, or concerning.
The most common reasons include:
- Trouble swallowing — feeling like food sticks in your chest or throat.
- Persistent heartburn — especially if it does not respond to acid-reducing medication.
- Unexplained stomach pain — pain in the upper abdomen that lasts weeks and has no clear cause.
- Vomiting blood or black stools — signs of bleeding in the upper digestive tract.
- Unexplained weight loss — losing weight without trying, along with digestive symptoms.
- Persistent nausea or vomiting — with no obvious cause.
- Abnormal imaging results — if a CT scan or X-ray showed something unusual in the esophagus or stomach.
- Anemia — low iron levels with no clear source of blood loss.
Some people also need an endoscopy for screening. If you have long-standing GERD for many years, especially with other risk factors, your doctor may recommend one to check for Barrett’s esophagus. This is a preventive measure, not a response to a new symptom.
How Do You Prepare For An Upper Endoscopy?
Preparation is straightforward but important. Your stomach must be empty for the doctor to see clearly and to reduce the risk of complications.
You will be told not to eat or drink anything for about 8 hours before the procedure. That means no food, no water, no coffee, and no chewing gum. Even a small amount of liquid can interfere with the view or increase the risk of vomiting during sedation.
Tell your doctor about every medication you take. This includes prescription drugs, over-the-counter medicines, and supplements. Blood thinners like warfarin, apixaban, or clopidogrel usually need to be paused before the procedure. Iron supplements also need to be stopped because they can stain the stomach lining and hide problems.
You will need someone to drive you home. The sedation impairs your judgment and reflexes for several hours after the procedure. You should not drive, operate machinery, or make important decisions for the rest of the day.
What Are The Risks And Complications?
An upper endoscopy is a very safe procedure. Serious complications are rare. But they do happen, and you should know what they are.
The most common side effects are a sore throat and mild bloating. These usually resolve within a day or two. The sore throat comes from the scope passing through your throat. The bloating comes from the air used during the procedure.
More serious complications include:
- Bleeding — usually minor and happens at a biopsy site. It rarely requires treatment.
- Perforation — a tear in the wall of the esophagus, stomach, or intestine. This is very rare but serious and requires surgery.
- Reactions to sedation — breathing problems, low blood pressure, or allergic reactions. Your vital signs are monitored throughout the procedure.
- Infection — very uncommon with standard sterilization practices.
The risk of perforation is about 1 in 2,500 to 1 in 11,000 procedures, depending on the reason for the endoscopy. It is higher if the doctor is removing a large polyp or treating a narrow esophagus. The overall risk of serious complications is well under 1 percent for diagnostic procedures.
What Happens After The Procedure?
You wake up in a recovery area. A nurse monitors you until the sedation wears off. Most people feel fine within an hour, but the effects of sedation can linger for the rest of the day.
Your throat may feel numb for a short time. You will be told not to eat or drink until you can swallow normally. Once you can, you can usually eat a light meal. Some doctors recommend soft foods for the first day.
Your doctor will discuss the findings with you before you leave or shortly after. If biopsies were taken, those results take a few days to a week. A biopsy does not mean cancer. It is a standard part of the procedure for many conditions.
You may have mild bloating and gas for a few hours. This is normal. Call your doctor if you develop severe abdominal pain, vomiting blood, fever, or trouble breathing after the procedure. These are not normal and need prompt attention.
Are There Alternatives To An Upper Endoscopy?
Yes, but none of them provide the same combination of direct visualization and tissue sampling.
Barium swallow — you drink a chalky liquid and X-rays track it through your digestive tract. It shows structural problems like narrowing or blockages but cannot show subtle inflammation or take biopsies.
Capsule endoscopy — you swallow a pill-sized camera that takes pictures as it travels through your digestive system. It is useful for the small intestine, which a standard endoscope cannot reach. But it cannot take biopsies or treat problems.
CT scan — useful for looking at organs outside the digestive tract, but it does not show the inner lining well.
These alternatives are used when a person cannot tolerate an endoscopy or when the suspected problem is outside the reach of the standard scope. For most upper digestive symptoms, an endoscopy remains the gold standard.
What Is An Upper Endoscopy And Why Would You Need One — The Bottom Line
An upper endoscopy is a safe, common, and highly effective way to diagnose problems in the esophagus, stomach, and duodenum. It is the only test that lets a doctor see these areas directly and take tissue samples at the same time.
You would need one if you have persistent symptoms like trouble swallowing, unexplained stomach pain, bleeding, or reflux that does not respond to medication. It is also used for screening in people with long-standing GERD.
The procedure itself is brief and low-risk. The benefits of an accurate diagnosis far outweigh the small risks for most people. If your doctor recommends one, it is because the information it provides will change how your condition is managed.
Frequently Asked Questions
How long does an upper endoscopy take?
The procedure itself takes 15 to 30 minutes. You will spend about 1 to 2 hours total at the facility, including preparation and recovery.
Is an upper endoscopy painful?
No. You receive sedation through an IV, so you feel relaxed and usually do not remember the procedure. You may feel mild bloating or a sore throat afterward.
Can I eat before an upper endoscopy?
No. You must not eat or drink anything for about 8 hours before the procedure. An empty stomach is required for a clear view and for your safety during sedation.
How long does it take to get biopsy results from an endoscopy?
Biopsy results typically take 3 to 7 days. Your doctor will contact you with the results and explain what they mean.

