Upper gastrointestinal endoscopy — also called oesophago-gastro-duodenoscopy (OGD), gastroscopy, or simply an endoscopy — is a procedure in which a specialist passes a thin, flexible camera into the mouth, down the oesophagus, through the stomach, and into the first part of the small intestine (the duodenum). It is one of the most commonly performed diagnostic and therapeutic procedures in gastroenterology, used to directly visualise the lining of the upper digestive tract, take biopsies, and in many cases treat conditions at the same time as diagnosing them. For patients who have been referred for an endoscopy — whether because of persistent heartburn, difficulty swallowing, unexplained anaemia, or an alarm symptom — understanding exactly what the procedure involves, how to prepare, and what findings mean transforms an anxiety-inducing investigation into a manageable and informative one.
Endoscopy has transformed the management of upper gastrointestinal disease since its widespread introduction in the 1970s. Before fibre-optic endoscopy, the diagnosis of peptic ulcer disease, gastric cancer, oesophageal varices, and oesophagitis required invasive surgery or relied on barium contrast radiology — techniques that could not obtain tissue samples or provide the visual clarity of direct mucosal inspection. Modern video endoscopes transmit high-definition images to a monitor in real time, allow targeted biopsies through an instrument channel in the scope, and can deliver therapeutic interventions — haemostasis for bleeding ulcers, dilation of strictures, removal of polyps — without any surgical incision. When combined with the blood test and imaging investigations covered across this series, endoscopy completes the clinical picture for patients with upper gastrointestinal symptoms or liver disease complications.
What Is Upper Gastrointestinal Endoscopy?
Upper GI endoscopy uses a flexible endoscope — a long, narrow tube approximately 9–11 mm in diameter at the tip — that contains bundles of fibre-optic fibres or, in modern instruments, a charge-coupled device (CCD) camera chip at the tip that transmits video images to a monitor. The endoscope also contains a working channel through which instruments (biopsy forceps, injection needles, clip applicators, snares) can be passed. Air or carbon dioxide can be insufflated through the endoscope to expand the stomach and intestinal lumen for better mucosal visualisation, and water can be injected to wash the mucosa clean. A suction channel allows fluid, blood, and secretions to be aspirated. The endoscopist controls the tip of the endoscope using two-handed manipulation of dials and wheels at the hand-piece, allowing four-directional movement of the scope tip and enabling detailed inspection of the oesophageal, gastric, and duodenal mucosa from multiple angles.
The structures visualised during a standard OGD are: the oesophagus (from the cricopharyngeal muscle at approximately 15 cm from the incisors to the gastro-oesophageal junction, typically at 38–42 cm); the stomach (cardia, fundus, body, antrum, and pylorus, inspected with forward-viewing and J-manoeuvre retroflexion to view the cardia and fundus from below); and the duodenum (bulb/first part and D2/second part to the level of the papilla of Vater). The total procedure typically takes five to fifteen minutes for a standard diagnostic OGD, though therapeutic procedures (polypectomy, haemostasis, dilation) extend the duration. Endoscopy is distinct from colonoscopy (which examines the large bowel from the rectum to the caecum and terminal ileum) and from capsule endoscopy (a swallowed pill-sized camera that images the small bowel) — articles on both are available in this series.
When Is Endoscopy Ordered?
Endoscopy is indicated in a broad range of clinical situations spanning diagnostic investigation, therapeutic intervention, and surveillance. Understanding which symptoms and findings prompt a referral for endoscopy — and why — helps patients contextualise the reason for their referral and approach the procedure with appropriate expectations.
Alarm symptoms requiring urgent or urgent endoscopy: Alarm (or “red flag”) symptoms in the context of upper GI disease prompt endoscopy within two weeks under most national guidelines (including NICE guidelines in the UK). These include: dysphagia (difficulty swallowing, particularly progressive dysphagia to solids then liquids, which raises concern for oesophageal cancer or stricture); unexplained unintentional weight loss; haematemesis (vomiting of blood or coffee-ground material) or melaena (black tarry stools indicating upper GI bleeding); unexplained iron-deficiency anaemia in adults over 50; persistent vomiting; palpable epigastric or abdominal mass; and new-onset dyspepsia in adults over 55 with at least one additional risk factor. The stool blood test pattern that may precede a referral for upper GI endoscopy is covered in the stool tests for digestive health article.
Symptomatic indications without alarm features: Persistent or refractory dyspepsia not responding to empirical treatment (proton pump inhibitors or H. pylori eradication); gastro-oesophageal reflux disease (GORD) not adequately controlled by medical treatment, or requiring confirmation of severity before escalation to surgical intervention (fundoplication); investigation of epigastric pain with features suggesting peptic ulcer disease; evaluation of odynophagia (painful swallowing); investigation of unexplained nausea, early satiety, or bloating not explained by other causes.
Diagnostic biopsy indications: Confirmation of coeliac disease (duodenal biopsies are required for Marsh grading — serology alone is insufficient for diagnosis in most cases); biopsy-based H. pylori testing (CLO rapid urease test and histology); biopsy of gastric polyps for histological classification; biopsy of mucosal abnormalities (nodules, ulcers, thickened folds) to exclude malignancy.
Therapeutic indications: Treatment of acute upper GI bleeding (injection haemostasis, haemoclips, argon plasma coagulation, band ligation of varices); dilation of oesophageal strictures (benign peptic or malignant); percutaneous endoscopic gastrostomy (PEG) tube placement for long-term nutritional support; removal of ingested foreign bodies or food bolus impaction; endoscopic mucosal resection (EMR) or endoscopic submucosal dissection (ESD) of early oesophageal or gastric neoplasms.
Surveillance indications: Barrett’s oesophagus surveillance (at intervals determined by segment length and dysplasia grade under BSG and ACG guidelines); post-gastric surgery surveillance (following partial gastrectomy, which increases gastric cancer risk); surveillance after endoscopic resection of early gastric or oesophageal neoplasia.
Preparing for Your Endoscopy
Preparation for upper GI endoscopy is considerably simpler than preparation for colonoscopy — there is no bowel preparation required. The key requirements are fasting, medication review, and arranging transport if sedation is planned.
Fasting: Patients must fast for at least six hours before the procedure (nothing to eat, including chewing gum and mints). Clear fluids (water) may be taken up to two hours before. This ensures the stomach is empty, reducing the risk of aspiration during the procedure and providing a clear view of the gastric mucosa that would otherwise be obscured by food residue. The endoscopy unit will provide specific fasting instructions — if the procedure is scheduled in the morning, most patients will be fasting from midnight; for afternoon procedures, a light early breakfast followed by fasting is usually permitted.
Medications: Most regular medications can be taken as usual with a small sip of water. Important exceptions: anticoagulants (warfarin, direct oral anticoagulants such as apixaban or rivaroxaban) may need to be temporarily stopped if biopsy or therapeutic procedures are anticipated — this is discussed at pre-assessment or with the referring clinician; antiplatelet agents (aspirin, clopidogrel) — aspirin is usually continued; clopidogrel and dual antiplatelet therapy require individualised decisions based on cardiovascular risk; insulin dosing on the day of the procedure requires specific guidance from the diabetes team or endoscopy unit given the fasting requirement; iron supplements are stopped forty-eight hours before to improve mucosal visualisation. Patients on proton pump inhibitors or H2 blockers should discuss whether to continue or withhold these before H. pylori testing — PPIs can cause false-negative CLO test results.
Sedation options: Patients are offered a choice between unsedated endoscopy with pharyngeal anaesthetic spray (lidocaine throat spray, which numbs the back of the throat and reduces the gag reflex) and conscious sedation using intravenous midazolam — a short-acting benzodiazepine that produces sedation, anxiolysis, and anterograde amnesia without general anaesthesia. Intravenous fentanyl may be added for analgesia in therapeutic procedures. Conscious sedation reduces patient discomfort significantly but requires a responsible adult escort for discharge and a twenty-four hour restriction from driving, operating machinery, and making legally significant decisions. Throat spray alone is briefer in recovery time (patients can typically drive and return to work within thirty to sixty minutes) but requires patient cooperation during the procedure. Patient preference and clinical factors (anticipated therapeutic intervention, patient anxiety, anatomical factors) guide the choice.
Informed consent: Patients receive an information leaflet before the procedure and will be asked to sign a consent form. The consent discussion covers the reason for the procedure, what it involves, the sedation option chosen, potential risks (described below), and what will happen if a biopsy or therapeutic intervention is performed. Patients can ask questions at any point and can withdraw consent at any time before or during the procedure.
What Happens During the Endoscopy
Understanding the step-by-step sequence of events during an endoscopy demystifies what can otherwise feel like an unknown and threatening experience. The procedure is performed by an endoscopist (a gastroenterologist, gastrointestinal surgeon, or specifically trained endoscopy nurse) assisted by an endoscopy nurse who monitors the patient throughout.
On arrival in the endoscopy suite, a cannula is inserted into a vein in the arm (for sedation delivery or emergency access, even if throat spray alone is chosen). Monitoring is attached: pulse oximetry (blood oxygen saturation), ECG, and blood pressure. Oxygen may be delivered via nasal prongs. If sedation is chosen, midazolam is administered intravenously at this point. A mouthguard (bite block) is placed between the teeth to protect the scope and prevent the patient biting down. The patient is positioned in the left lateral position — lying on their left side — which is the standard position that aligns the upper GI anatomy optimally for scope passage and reduces aspiration risk.
The endoscopist advances the scope through the mouthguard, over the tongue, and into the oropharynx, asking the patient to swallow to assist passage through the upper oesophageal sphincter (cricopharyngeal muscle). Once through this sphincter — the most technically challenging part of scope insertion — the scope passes easily down the oesophagus. The endoscopist inspects the oesophageal mucosa from the cricopharyngeal muscle to the gastro-oesophageal junction (Z-line), noting the squamo-columnar junction and checking for signs of oesophagitis, Barrett’s mucosa, strictures, or varices. On entering the stomach, air is insufflated to expand the lumen for mucosal inspection. The cardia, fundus, body, antrum, and pylorus are systematically inspected; the scope is retroflexed in the stomach to view the cardia and fundus from below (the J-manoeuvre). The pylorus is intubated and the duodenal bulb and second part of the duodenum are inspected. Biopsies are taken using forceps passed through the working channel — the patient feels no pain from biopsies as the gastrointestinal mucosa has no somatic pain receptors for cutting or crushing. The scope is then carefully withdrawn while maintaining inspection of all mucosal surfaces.
What Endoscopy Can Detect
The diagnostic yield of upper GI endoscopy spans a wide range of conditions across the oesophagus, stomach, and duodenum. The following are the most clinically significant findings patients may encounter in their endoscopy reports.
Oesophagitis: Inflammation of the oesophageal lining caused by acid reflux — graded using the Los Angeles (LA) Classification: Grade A (one or more mucosal breaks each less than 5 mm, not extending between mucosal folds); Grade B (one or more mucosal breaks more than 5 mm, not extending between folds); Grade C (mucosal breaks that extend between two or more mucosal folds but involving less than 75% of the oesophageal circumference); Grade D (mucosal breaks involving more than 75% of the oesophageal circumference). Grades A and B are mild to moderate oesophagitis; Grades C and D are severe and may require high-dose or maintenance PPI therapy. The relationship between oesophagitis, GORD symptoms, and the dietary factors that contribute to reflux is covered in other articles in this series.
Barrett’s oesophagus: A condition in which the normal squamous lining of the oesophagus is replaced by columnar epithelium containing specialised intestinal metaplasia (goblet cells) — an adaptive response to chronic acid exposure that carries an increased risk of oesophageal adenocarcinoma (approximately 0.5–1% per year of surveillance). Barrett’s appears endoscopically as salmon-pink or velvety mucosa extending above the gastro-oesophageal junction, measured using the Prague C&M classification (C = maximum circumferential extent, M = maximum extent of any tongue). Biopsies are taken to confirm specialised intestinal metaplasia and exclude dysplasia. The finding of low-grade dysplasia triggers more frequent surveillance (six to twelve months); high-grade dysplasia or early cancer in Barrett’s is treated with endoscopic ablation (radiofrequency ablation) or endoscopic resection rather than surgery in appropriately staged cases.
Oesophageal and gastric varices: Dilated submucosal veins in the oesophagus or stomach caused by portal hypertension in liver cirrhosis. Oesophageal varices appear as blue-tinged columns or protrusions in the mid to lower oesophagus. Their presence, size, and the presence of red whale signs (surface markings predicting imminent bleeding risk) determines management — primary prophylaxis with non-selective beta-blockers (propranolol, carvedilol) or endoscopic variceal band ligation. The liver disease background that leads to varices is covered in the liver function tests article and the cirrhosis article.
Peptic ulcers: Ulcerations of the gastric or duodenal mucosa caused by H. pylori infection, NSAID use, or acid hypersecretion. Gastric ulcers appear as crater-like lesions with surrounding mucosal oedema and erythema; all gastric ulcers require biopsy to exclude gastric adenocarcinoma (since malignant ulcers can appear benign endoscopically) and a follow-up endoscopy to confirm healing after treatment. Duodenal ulcers are almost universally benign and biopsy is not routinely required. Bleeding peptic ulcers show stigmata of recent haemorrhage — active bleeding, a visible vessel, adherent clot, or flat pigmented spots — which are classified by the Forrest classification and guide haemostatic treatment decisions.
Coeliac disease: The duodenal appearance of coeliac disease includes scalloping of the valvulae conniventes (Kerckring folds), mosaic pattern, and reduced fold height — changes caused by villous atrophy. Four to six duodenal biopsies (at least four from D2 and one from the duodenal bulb) are taken for Marsh grading: Marsh 0 = normal; Marsh 1 = lymphocytic infiltration only; Marsh 2 = crypt hyperplasia added; Marsh 3a–c = partial to subtotal villous atrophy. The serology tests (anti-tissue transglutaminase IgA, anti-endomysial antibody) that are typically positive before endoscopy in adults with coeliac disease are covered in the celiac disease testing article.
H. pylori: The CLO (Campylobacter-like organism) rapid urease test involves taking an antral biopsy and placing it in a gel containing urea and a pH indicator — H. pylori’s urease enzyme converts urea to ammonia, raising pH and turning the gel from yellow to pink within one to twenty-four hours. A positive CLO test is highly specific for active H. pylori infection. Histological examination of antral and corpus biopsies provides additional information on H. pylori density, inflammatory activity, and the presence of intestinal metaplasia (a pre-cancerous change associated with long-standing H. pylori infection that raises gastric cancer risk). The dedicated H. pylori test article covers the full range of H. pylori testing methods.
Biopsy and Therapeutic Procedures
One of the key advantages of endoscopy over imaging modalities (ultrasound, CT, MRI as covered in the related imaging articles) is the ability to obtain tissue samples and perform therapeutic interventions in the same procedure. The range of what can be achieved endoscopically has expanded considerably with advances in endoscopic technology over the past two decades.
Biopsy: Cold biopsy forceps take small tissue samples (approximately 2–3 mm) from the mucosal surface. Patients feel no pain from biopsies. Multiple biopsies are taken to improve the sampling adequacy for histopathological analysis. Biopsies are placed in formalin-filled pots, labelled with site information, and sent to the pathology laboratory where they are processed, stained, and reported by a histopathologist — results typically take one to two weeks. For coeliac disease, the Seattle protocol for Barrett’s surveillance, and gastric cancer surveillance programmes, specific biopsy protocols define the number and anatomical location of biopsies required for adequate sampling.
Haemostasis: Bleeding peptic ulcers are treated at the same endoscopy as diagnosis. Adrenaline (epinephrine) injection (1:10,000 dilution) is injected submucosally around the bleeding point to cause vasoconstriction and tamponade. Endoscopic clips (haemoclips) can be applied to mechanically compress the bleeding vessel. Thermal ablation methods (heater probe, bipolar electrocoagulation, argon plasma coagulation) coagulate the bleeding point. Combination of injection with a mechanical or thermal method is standard for high-risk stigmata (active bleeding or visible vessel). Band ligation is the first-line treatment for bleeding oesophageal varices — elastic bands are deployed around variceal columns to obliterate them; multiple sessions are required for variceal eradication.
Polypectomy: Gastric polyps detected at endoscopy are biopsied or removed depending on their size, morphology, and histological type. Small hyperplastic polyps and fundic gland polyps (the most common gastric polyps, typically associated with PPI use) can be left in situ if small or removed by cold snare or cold forceps. Adenomatous polyps carry a risk of progression to gastric cancer and are removed endoscopically regardless of size; large or sessile adenomatous lesions may require endoscopic mucosal resection (EMR) or endoscopic submucosal dissection (ESD). Dilation: Peptic oesophageal strictures and benign anastomotic strictures can be dilated at endoscopy using balloon dilators or Savary-Gilliard wire-guided bougies, restoring swallowing function without surgical intervention. Malignant strictures may be palliated with self-expanding metal stent (SEMS) placement.
After the Endoscopy: Recovery and Results
Recovery from upper GI endoscopy is typically rapid, particularly for patients who had throat spray without sedation. For sedated patients, the recovery period lasts thirty to sixty minutes in the endoscopy unit recovery bay, under nursing observation, until the sedation has worn off sufficiently for safe discharge. The endoscopist will usually explain the main findings verbally before or during the recovery period, and a written report will be provided before discharge or sent to the referring GP.
Common symptoms after endoscopy include mild throat soreness or discomfort (from scope passage through the oropharynx), which typically resolves within twenty-four hours; bloating or belching from the air insufflated during the procedure; and mild nausea. These are expected and self-limiting. Eating and drinking can resume within thirty to sixty minutes after the procedure once any throat spray anaesthesia has worn off (to prevent aspiration) — the unit will advise on this. Sedated patients must not drive, operate machinery, or drink alcohol for twenty-four hours after the procedure; a responsible adult must escort them home. Biopsy results, when taken, are typically available within one to two weeks and are communicated by letter, via the GP, or at a follow-up clinic appointment depending on local practice.
Risks and Complications
Upper GI endoscopy is one of the safest invasive procedures performed in medicine — the overall serious complication rate is below one in one thousand for diagnostic procedures. However, as with any invasive procedure, a small number of significant complications can occur, and patients should be aware of these as part of informed consent.
Perforation: The most serious complication — a tear through the wall of the oesophagus, stomach, or duodenum — occurs in approximately one in two thousand to one in ten thousand diagnostic endoscopies. The risk is significantly higher with therapeutic procedures (dilation, EMR, ESD). Oesophageal perforation most commonly occurs at the Killian’s dehiscence (Zenker’s diverticulum) or Passavant’s ridge in elderly patients with dysphagia. Perforation typically presents with severe pain, surgical emphysema, and clinical deterioration within hours of the procedure and requires urgent surgical or endoscopic repair. Bleeding: Diagnostic biopsies very rarely cause significant haemorrhage — the risk is higher after polypectomy or EMR. Most post-biopsy bleeding stops spontaneously; clinically significant haemorrhage after biopsy is rare. Aspiration: Inhalation of gastric contents during the procedure is prevented by adequate fasting and the left lateral position; it remains rare but can cause aspiration pneumonia, particularly in patients with impaired airway protection reflexes. Sedation reactions: Midazolam can cause respiratory depression, particularly in elderly patients and those with pre-existing respiratory disease. Monitoring throughout the procedure and availability of the reversal agent flumazenil mitigates this risk. Cardiopulmonary events: Minor oxygen desaturation during sedation is common and typically self-correcting; significant cardiac events are rare in appropriately assessed patients. Patients who develop severe pain, haematemesis, fever, or difficulty breathing after an endoscopy should seek emergency medical review immediately.
Frequently Asked Questions About Endoscopy
I’ve been referred urgently for endoscopy — does urgent mean I probably have cancer?
An urgent endoscopy referral in the UK (the two-week wait pathway) is triggered by alarm symptoms that require prompt investigation — dysphagia, significant weight loss, haematemesis, or new dyspepsia with risk factors — because these symptoms can be associated with oesophageal or gastric cancer. However, the majority of patients investigated through the two-week wait pathway do not have cancer: studies consistently show that over seventy percent of two-week wait upper GI referrals result in a benign diagnosis — oesophagitis, peptic ulcer, Barrett’s oesophagus, hiatus hernia, or a normal endoscopy. The urgent pathway exists because early diagnosis dramatically improves outcomes for the minority who do have cancer — early-stage oesophageal and gastric cancer is often curable endoscopically or surgically. Urgent referral reflects clinical prudence, not certainty of a serious diagnosis. If you are concerned about your referral, your GP can discuss the specific reason for the referral and what findings are being looked for. The CT imaging that may complement endoscopy in the staging of oesophageal and gastric conditions is covered in the CT scan for digestive and liver problems article.
My endoscopy showed mild gastritis and H. pylori — what should I expect next?
H. pylori-positive gastritis is a common and treatable finding. The standard treatment is eradication therapy — a seven to fourteen day course of triple therapy (proton pump inhibitor plus two antibiotics, typically clarithromycin and amoxicillin as first-line) or, in areas with high clarithromycin resistance, bismuth quadruple therapy (PPI, bismuth subsalicylate, tetracycline, metronidazole). Eradication is confirmed by a breath test or stool antigen test four to eight weeks after completing treatment, stopping PPIs two weeks before testing to prevent false-negative results. Successful H. pylori eradication heals the associated gastritis, resolves the majority of duodenal ulcers, and reduces the risk of gastric ulcer recurrence and gastric cancer. The full picture of H. pylori testing methods — including the breath test and stool antigen test that may be used before or after endoscopy — is detailed in the dedicated H. pylori test article. A follow-up endoscopy after H. pylori eradication is not routinely required unless a gastric ulcer was found (which requires follow-up to confirm healing and exclude malignancy) or there are concerns about incomplete eradication.
How does endoscopy fit into the broader investigation of digestive and liver symptoms?
Endoscopy is one component of a comprehensive investigative framework for upper GI and liver disease. It provides direct mucosal visualisation and tissue sampling that no other investigation can replicate, but it is complemented by blood tests (liver function tests, full blood count, coeliac serology, H. pylori serology), stool tests, and imaging investigations. The choice of investigation depends on the clinical presentation: patients with symptoms suggesting liver disease may be investigated first with liver function tests and abdominal ultrasound before endoscopy; patients with upper GI symptoms and no alarm features may be investigated with H. pylori breath test and empirical treatment before endoscopy is considered. Understanding how the different investigations complement each other — and why a clinician chooses one over another for a specific clinical question — is the foundation of evidence-based digestive health management.
Sources: BSG — Barrett’s Oesophagus Guidelines · ASGE — Endoscopy Practice Guidelines · NIDDK — Upper GI Endoscopy

This is exactly what I needed to read before my procedure next week. I’ve been referred on the two-week wait pathway for dysphagia and was quite anxious about what that meant. The section explaining that the majority of two-week wait referrals turn out to be benign was genuinely reassuring — I hadn’t realised that was the case. The step-by-step explanation of the procedure itself has made it feel much less scary.
Thank you Claire — that context about two-week wait referrals is one of the most important things to know before an urgent endoscopy, because the urgency of the referral is about not delaying diagnosis for those who do need it, not a signal that a serious diagnosis is likely. Progressive dysphagia is absolutely worth investigating promptly, and in most cases will have a benign explanation (oesophagitis, a peptic stricture, a motility disorder). The endoscopy team will discuss what they find with you on the day, and you’re very welcome to ask questions before, during, and after the procedure. Wishing you all the best for next week.
Had an endoscopy last month — found Grade B oesophagitis and H. pylori positive on the CLO test. I’m now halfway through triple therapy. The explanation of what the LA grading means for oesophagitis made the report much more interpretable. One thing I’d add from my experience: the throat spray endoscopy wasn’t as uncomfortable as I’d anticipated, and being able to drive home afterwards was a real practical advantage.