MSD Manual

Please confirm that you are not located inside the Russian Federation

honeypot link



Jonathan Gotfried

, MD, Lewis Katz School of Medicine at Temple University

Reviewed/Revised Mar 2023
Topic Resources

Endoscopy is an examination of internal structures using a flexible viewing tube (endoscope). In addition to examinations, doctors can use endoscopy to do biopsies and give treatment.

Endoscopes are flexible and provide both a lighting source and a small camera, which allow doctors to get a good view of the digestive tract lining. Doctors can see areas of irritation, ulcers, inflammation, and abnormal tissue growth. Some endoscopes have ultrasound probes on the tip. Images from these probes can show details that ultrasound probes placed on the person's skin cannot.

Endoscopes range in diameter from about ¼ inch (a bit more than ½ centimeter) to about ½ inch (1¼ centimeters) and range in length from about 1 foot (about 30½ centimeters) to about 6 feet (almost 2 meters). The choice of endoscope depends on which part of the digestive tract is to be examined.

When passed through the mouth, an endoscope can be used to examine the following structures:

  • The esophagus (esophagoscopy)

  • The stomach (gastroscopy)

  • The upper portion of the small intestine (upper gastrointestinal endoscopy)

  • More of the small intestine (enteroscopy)

In another type of endoscopy called video capsule endoscopy Video Capsule Endoscopy Video capsule endoscopy (wireless video endoscopy) is a procedure in which the person swallows a battery-powered capsule. The capsule contains one or two small cameras, a light, and a transmitter... read more , doctors do not use an endoscope but rather have a person swallow a battery-powered capsule that contains a camera that transmits pictures of the parts of the small intestine that are too difficult to see with an endoscope.

When passed through the anus, an endoscope can be used to examine the following structures:

  • The rectum (anoscopy)

  • The lower portion of the large intestine, the rectum, and the anus (sigmoidoscopy)

  • The entire large intestine, the rectum, and the anus (colonoscopy)

Viewing the Digestive Tract with an Endoscope

A flexible tube called an endoscope is used to view different parts of the digestive tract. When passed through the mouth (as shown on the left), an endoscope can be used to examine the esophagus, stomach, and some of the small intestine. When passed through the anus (right), an endoscope can be used to examine the rectum and the entire large intestine.

Viewing the Digestive Tract with an Endoscope
Endoscopy: Viewing the Stomach


Before having any endoscopic procedure, a person must avoid food for 8 hours and avoid liquids for 2 to 4 hours. Food in the stomach can block the doctor’s view and might be vomited up during the procedure.

Before having an endoscope passed into the rectum and colon, a person usually is given laxatives and is sometimes given enemas to clear out any stool. For some procedures, people may need to consume only liquids (such as gelatin or broth) the day before the procedure.

Immediately before most endoscopic procedures, people are given medications by vein (intravenously) to calm them and prevent discomfort (sedation). Typically, no sedation is needed for anoscopy and sigmoidoscopy.


For example, people who are at high risk of developing colon cancer and people who are age 45 and older should undergo colonoscopy to detect polyps or other changes. Colonoscopy should be done every 10 years in people who have no risk factors for colon cancer or more frequently or at an earlier age in people who have had polyps in the colon Polyps of the Colon and Rectum A polyp is a growth of tissue that projects from the wall of a hollow space, such as the intestines. Some polyps are caused by hereditary conditions. Bleeding from the rectum is the most common... read more Polyps of the Colon and Rectum or have a family history of colon cancer.


Small tools can be inserted through endoscopes and used to take tissue samples (endoscopic biopsy). These samples can then be evaluated for inflammation, infection, or cancer. Because the lining and the inner layers of the walls of the digestive tract do not have nerves that sense pain (with the exception of the lower part of the anus), this procedure is painless.

Colonoscopy: Obtaining a Biopsy Sample


Endoscopes can also be used for treatment. A doctor can pass different types of instruments through a small channel in the endoscope. For example, an electric probe at the tip of the endoscope can be used to destroy abnormal tissue and small growths or to close off a blood vessel. A needle at the tip can be used to inject medications into dilated veins in the esophagus and stop their bleeding.

Endoscopes are also used to place stents, drain cysts, remove foreign bodies, place feeding tubes, and remove polyps.


Complications resulting from endoscopy are relatively rare, and most are related to the medications used for sedation.

Although endoscopes can injure or even perforate the digestive tract, they more commonly cause irritation of the tract lining and a little bleeding that typically goes away on its own.

quiz link

Test your knowledge

Take a Quiz!