An upper endoscopy is typically recommended when you have digestive symptoms that haven’t improved with initial treatment, or when certain warning signs suggest something more serious needs investigation. Most people don’t need one for ordinary heartburn or a stomachache, but specific symptoms, risk factors, and failed treatments can make it the right next step.
Warning Signs That Call for an Endoscopy
Certain symptoms are considered “alarm” signs in gastroenterology, meaning they raise enough concern to justify looking directly at the lining of your esophagus, stomach, or upper intestine. These include difficulty swallowing, pain when swallowing, unexplained weight loss, vomiting blood or finding blood in your stool, persistent vomiting, loss of appetite, and anemia (low red blood cell count). If you have any of these, your doctor will likely recommend an endoscopy rather than taking a wait-and-see approach.
Among these, vomiting blood or bloody stool and low hemoglobin are the strongest independent predictors of actually finding something abnormal during the procedure. That doesn’t mean the other symptoms aren’t important, but it does explain why bleeding and anemia tend to move you to the front of the line.
Acid Reflux That Won’t Respond to Treatment
Gastroesophageal reflux disease (GERD) is one of the most common reasons people end up getting scoped. But an endoscopy isn’t the first step for garden-variety heartburn. You’d typically start with a course of acid-reducing medication, usually a proton pump inhibitor (PPI), for several weeks. An endoscopy enters the picture when you’ve had little or no improvement on that medication, or only a partial response.
Your doctor may also recommend one if you have chronic GERD and meet certain risk criteria for Barrett’s esophagus, a condition where the tissue lining your esophagus changes in a way that slightly increases cancer risk. Risk factors for Barrett’s include long-standing reflux symptoms (generally five years or more), being male, being over 50, smoking, and having excess abdominal fat. If you’ve already had an anti-reflux surgery or a previous endoscopic procedure and symptoms return, that’s another reason to scope again.
Confirming Celiac Disease
If blood tests suggest celiac disease, an endoscopy with biopsies from the small intestine is the standard way to confirm the diagnosis in adults. The procedure involves taking small tissue samples from the duodenum (the first section of the small intestine), and the recommended approach is at least six biopsies: two from the bulb and four from the second portion. That number matters because celiac damage can be patchy, so sampling multiple spots reduces the chance of a false negative.
Children sometimes get to skip the endoscopy. If a child’s blood antibody levels are very high (ten times the upper limit of normal) and a second confirmatory blood test is also positive, European guidelines allow the diagnosis without biopsy. For adults, though, the biopsy remains the definitive step.
Screening for Stomach Cancer
Routine endoscopic screening for stomach cancer isn’t recommended for the general population in the United States, where rates are relatively low. But certain groups face higher risk and may benefit from surveillance. These include people with atrophic gastritis or pernicious anemia, those who’ve had part of their stomach surgically removed, people with certain hereditary cancer syndromes like familial adenomatous polyposis, and immigrants from countries where gastric cancer is common (parts of East Asia, Central and South America, and Eastern Europe).
If you fall into one of these categories, your doctor may suggest periodic endoscopy to catch precancerous changes early, even if you feel fine.
When a Persistent H. Pylori Infection Needs a Closer Look
H. pylori, the bacterium linked to stomach ulcers and gastric cancer, can usually be detected with a breath test or stool test. An endoscopy becomes useful when those initial treatments fail. If the first round of antibiotics doesn’t clear the infection, an endoscopy lets your doctor take a tissue sample directly from the stomach lining to figure out exactly which antibiotic the bacteria will respond to. It’s also the better choice when your doctor wants to simultaneously evaluate other digestive problems like ulcers or inflammation.
What Happens During and After the Procedure
An endoscopy that starts as purely diagnostic can become therapeutic on the spot. If the doctor sees a bleeding ulcer, they can cauterize it. If they find polyps, they can remove them. Narrowed sections of the esophagus can be stretched open with a dilation tool. Other interventions include placing stents to keep passages open, removing swallowed foreign objects, and banding enlarged veins (varices) that could rupture.
The procedure itself is short, usually 15 to 30 minutes. You’ll be sedated, so you won’t remember much. Beforehand, you’ll need to stop eating solid food after midnight the night before and have nothing to eat or drink for at least eight hours before your appointment. You can take essential medications up to four hours before the procedure with small sips of water, but antacids should be skipped. If you take blood thinners or diabetes medications, your doctor’s office will give you specific instructions, as these often need to be adjusted.
Recovery in the facility typically takes 30 to 60 minutes as the sedation wears off. You’ll need someone to drive you home. The standard recommendation is to avoid driving for 24 hours after sedation, though simulator studies suggest most people’s driving ability returns to normal around four hours post-procedure. You may have a mild sore throat or feel bloated from the air used to inflate your stomach during the exam, but both resolve quickly.
How Safe Is It?
A diagnostic endoscopy is one of the safest procedures in medicine. The risk of perforation (the scope accidentally puncturing the lining of the digestive tract) during a standard diagnostic exam is roughly 0.002%, or about 1 in 50,000. Therapeutic procedures carry higher risk because they involve cutting, stretching, or removing tissue, but even those remain low for most interventions.
Bleeding and infection are the other main concerns but are similarly rare for routine exams. The risks go up with more complex procedures, with the endoscopist’s experience level, and when the anatomy is unusual or distorted by disease. For the vast majority of people getting a straightforward upper endoscopy, complications are exceptionally uncommon.

