What you eat before an endoscopy depends entirely on which type of endoscopy you are having. For an upper endoscopy (where a camera goes down your throat into the stomach), the standard rule is to stop eating solid food at least six hours beforehand and stop drinking clear liquids at least two hours before the procedure. For a colonoscopy, dietary preparation starts days earlier and involves switching to specific foods that leave minimal residue in your colon, followed by a liquid laxative prep and a final fasting window. The details matter more than most people expect, and recent research on weight-loss medications has added a new wrinkle that affects millions of patients.
Fasting Before an Upper Endoscopy
An upper endoscopy (also called an EGD, for esophagogastroduodenoscopy) requires your stomach to be empty so the doctor can see the lining clearly and so you don’t aspirate food into your lungs during sedation. The widely followed rule is no solid food for at least six hours before the procedure and no clear liquids for at least two hours. In a prospective study of patients presenting for gastrointestinal endoscopy, all completed the minimum two-hour clear-fluid fast, and over 97% completed the minimum six-hour solid-food fast.1PubMed. High-risk residual gastric content in fasted patients undergoing gastrointestinal endoscopy: a prospective cohort study of prevalence and predictors These thresholds are not arbitrary; they reflect how long the stomach typically takes to empty different substances.
In practical terms, if your endoscopy is scheduled for the morning, your last solid meal is usually dinner the night before. If it’s scheduled for the afternoon, you can sometimes have a very light breakfast early in the morning, as long as you leave a solid six-hour window. Your endoscopy center will give you specific cutoff times. Clear liquids during the fasting window usually means water, clear broth, black coffee, tea without milk, or apple juice. Anything with pulp, fat, or milk protein is not a clear liquid for these purposes.
What Counts as a “Low-Residue Diet” Before a Colonoscopy
Colonoscopy preparation is more involved because the entire large intestine needs to be clean enough for the doctor to spot polyps and abnormalities. Traditionally, many centers told patients to spend the entire day before the procedure on a clear liquid diet: broth, gelatin, clear juices, popsicles, and nothing else. This is miserable, and a growing body of evidence says it’s unnecessary for most people.
A low-residue (sometimes called low-fiber) diet the day before colonoscopy produces bowel preparation that is just as clean as a clear liquid diet, while being far more tolerable. A systematic review and meta-analysis found no difference in adequate bowel preparations between patients given a low-residue diet and those restricted to clear liquids, but the low-residue group had better tolerability and fewer side effects like hunger, nausea, and vomiting.2PubMed. Efficacy and tolerability of a low-residue diet for bowel preparation: systematic review and meta-analysis Another meta-analysis confirmed the same pattern: equivalent bowel cleanliness scores, but patients on the low-residue diet were more willing to repeat the preparation for a future colonoscopy.3PubMed Central. A Systematic Review and Meta-Analysis of Low-Residue Diet Versus Clear Liquid Diet: Which Is Better for Bowel Preparation Before Colonoscopy? A third independent meta-analysis reached the same conclusion: equivalent prep quality, better tolerance, and greater willingness to repeat.4PubMed Central. Regime for Bowel Preparation in Patients Scheduled to Colonoscopy: Low-Residue Diet or Clear Liquid Diet? Evidence From Systematic Review With Power Analysis
One randomized trial actually found the low-fiber diet statistically superior, with an adequate bowel preparation rate of about 96% compared to roughly 89% for the clear liquid group.5PubMed Central. Randomized Clinical Trial: A Normocaloric Low-Fiber Diet the Day Before Colonoscopy Is the Most Effective Approach to Bowel Preparation in Colorectal Cancer Screening Colonoscopy So if your doctor’s office still hands you a sheet that says “clear liquids only the day before,” it’s worth asking whether a low-residue diet is an option. Many centers have already updated their instructions.
A low-residue diet means you can eat things like white bread, eggs, lean chicken or fish, white rice or pasta, canned fruits without skin, well-cooked vegetables without seeds, and yogurt without granola or fruit pieces. You avoid whole grains, raw vegetables, nuts, seeds, popcorn, beans, and high-fiber cereals. It is not a feast, but being allowed to eat actual food the day before a colonoscopy makes the whole ordeal considerably more bearable.
Timing Your Bowel Prep Solution
The laxative prep itself (the large-volume liquid you drink to flush out the colon) works best when split into two doses: one the evening before and the second dose early the morning of the procedure. This is called split-dose prep, and it has a real impact on how clean your colon ends up being. A randomized study found that the best bowel cleanliness was observed when the colonoscopy was performed within eight hours of the last fluid intake of the prep solution, compared to longer gaps.6PubMed. Effective bowel cleansing before colonoscopy: a randomized study of split-dosage versus non-split dosage regimens of high-volume versus low-volume polyethylene glycol solutions This means that finishing your second dose at, say, 4 a.m. for a morning colonoscopy gives you a better clean than drinking the whole thing the night before and leaving a 12-hour gap.
Yes, it means waking up very early. Most patients will tell you the early alarm is the worst part. But the alternative — an inadequately prepped colon — can mean the doctor either misses things or has to reschedule you to do it all over again, which is worse.
Why a Clean Colon Actually Matters
This is not just a formality. The quality of your bowel preparation directly affects whether the doctor can find polyps, including precancerous ones. A tandem colonoscopy study (where the same patient gets scoped twice in a row to see what was missed the first time) found that the miss rate for advanced adenomas jumped from about 9% in patients with excellent prep to 37% in patients with poor or inadequate prep.7Clinical Endoscopy. The Effect of the Bowel Preparation Status on the Risk of Missing Polyp and Adenoma during Screening Colonoscopy: A Tandem Colonoscopic Study Patients with poor prep were independently associated with more than five times the odds of having a missed advanced adenoma compared to those with excellent prep.7Clinical Endoscopy. The Effect of the Bowel Preparation Status on the Risk of Missing Polyp and Adenoma during Screening Colonoscopy: A Tandem Colonoscopic Study In other words, the dietary restrictions and unpleasant prep drink exist to protect you from the exact thing a colonoscopy is designed to catch.
Stay Hydrated Throughout the Prep
One aspect people underestimate is how dehydrating bowel prep can be. You are flushing a great deal of fluid through your system, and electrolyte shifts are common. A systematic review of electrolyte disturbances after bowel preparation found that low potassium occurred in roughly 5% of patients after PEG-based preps and around 17% of patients after sodium phosphate preps.8PubMed Central. Electrolyte disturbances after bowel preparation for colonoscopy: Systematic review and meta‐analysis Dehydration-related complications can be reduced by maintaining adequate fluid intake before, during, and after bowel preparation, and your doctor should consider kidney function and other health conditions when choosing a prep.9PubMed. Bowel preparation for colonoscopy–the importance of adequate hydration
The practical advice: drink more clear fluids than you think you need in the day or two leading up to your colonoscopy. Water, clear broth, sports drinks without red or purple dye, and clear electrolyte solutions all count. This isn’t just about comfort; it’s about keeping your blood chemistry stable during a process that aggressively depletes fluids.
GLP-1 Medications and Retained Food in the Stomach
If you take a GLP-1 receptor agonist — the class that includes semaglutide (Ozempic, Wegovy) and tirzepatide (Mounjaro, Zepbound) — there is a specific concern you need to discuss with your doctor well before any endoscopy. These medications slow gastric emptying, which is part of how they reduce appetite. But that same effect means food can sit in your stomach much longer than expected, even after a standard fasting period.
A meta-analysis found that GLP-1 receptor agonist users had roughly four and a half times the odds of retained gastric contents compared to nonusers undergoing endoscopy, and the same increase in odds of premature procedure termination because the stomach still had food in it.10Gastrointestinal Endoscopy. Glucagon-like peptide-1 receptor agonist use and the risk of residual gastric contents and aspiration in patients undergoing GI endoscopy: a systematic review and a meta-analysis A retrospective study of patients undergoing upper endoscopy found retained gastric contents in about 13% of GLP-1 receptor agonist users compared to roughly 6% of matched controls.11PubMed. Perioperative glucagon-like peptide-1 receptor agonist use and retained gastric contents: A retrospective analysis of patients undergoing elective upper endoscopy
For the millions of people now on these medications, this creates a real scheduling problem. A multicentre retrospective study found that fasting from solid foods for more than 15 hours was associated with significantly lower odds of retained gastric contents in GLP-1 receptor agonist users. The standard six-hour fast was not long enough for many of these patients. Interestingly, the meta-analysis also found that when both an upper endoscopy and colonoscopy were done on the same day, the risk of retained gastric contents dropped substantially compared to upper endoscopy alone, likely because the colonoscopy prep had already flushed the system.10Gastrointestinal Endoscopy. Glucagon-like peptide-1 receptor agonist use and the risk of residual gastric contents and aspiration in patients undergoing GI endoscopy: a systematic review and a meta-analysis
Guidelines on when to stop these medications before endoscopy are still evolving. Some centers recommend stopping the injectable once-weekly formulations at least a week before the procedure, while others recommend longer fasting periods instead. The bottom line: tell your endoscopy team about GLP-1 medications early so they can adjust your prep instructions accordingly.
Can You Chew Gum While Fasting?
This comes up more often than you might expect. You’re told not to eat or drink, so does chewing gum count? The research is mixed, and the answer depends on who you ask. One study in children found that those who chewed gum (both sugared and sugarless) had significantly higher gastric fluid volumes than those who did not.12PubMed. Residual gastric fluid volume and chewing gum before surgery A study in adults similarly found that gum chewers had a statistically higher gastric volume.13PubMed. Effect of Gum Chewing on the Volume and pH of Gastric Contents: A Prospective Randomized Study
However, another randomized crossover study found that chewing gum did not significantly affect gastric emptying of water or residual stomach volume after two hours.14British Journal of Anaesthesia. Effect of gum chewing on gastric volume and emptying: a prospective randomized crossover study The 2023 American Society of Anesthesiologists guidelines addressed chewing gum specifically as part of an updated review of preoperative fasting practices, and the general trend in anesthesia guidance has moved toward treating gum chewing as unlikely to pose a meaningful aspiration risk. Still, most endoscopy centers will tell you to spit out any gum before the procedure begins, and some ask you to avoid it entirely during the fasting window to keep things simple. It’s not a hill worth dying on — just skip the gum for a few hours.
Carbohydrate Drinks Before Upper Endoscopy
A newer area of research involves giving patients a carbohydrate-rich clear drink a couple of hours before upper endoscopy, with the idea of reducing hunger, thirst, and anxiety without compromising safety. A randomized trial comparing a pre-endoscopy maltodextrin (carbohydrate) beverage to plain water found no significant difference in residual stomach volume between the two groups, and both groups showed significant reductions in discomfort scores including hunger and anxiety. Neither group had any aspiration complications.15Scientific Reports. The effect of pre-endoscopy maltodextrin beverage on gastric residual volume and patient’s well-being: a randomised controlled trial
A different trial that tested a carbohydrate-rich whey protein beverage told a more cautionary story: the protein drink group had significantly higher residual stomach volumes, with 77% of those patients retaining more than 25 ml of fluid compared to just 10% in the water-only group. The protein drink did reduce anxiety, but the trade-off in gastric volume was substantial.16Scientific Reports. Efficacy and safety of pre-gastroscopy commercial carbohydrate-rich whey protein beverage vs. plain water: a randomised controlled trial So a simple carbohydrate drink appears to be safe; adding protein to the mix is a different story. Unless your center specifically offers a pre-procedure carbohydrate drink as part of its protocol, stick with plain water or nothing.
Children and Fasting Before Endoscopy
Pediatric fasting guidelines follow the same broad principles as adult ones — no solids for six hours, clear liquids allowed up to two hours before — but there is growing recognition that children may be fasted for unnecessarily long periods in practice. A review of the evidence found that fasting for more than two hours after clear fluids does not significantly change stomach pH or volume in children, raising the question of whether shorter fasting windows might be safe and more humane for young patients who struggle with prolonged hunger.17PubMed Central. Preoperative Fasting Guidelines in Children: Should They Be Revised? In reality, because of scheduling delays and conservative buffer times, many children end up fasting for eight or ten hours before their procedure. If your child has a morning endoscopy, offering clear fluids up to the two-hour cutoff rather than cutting everything off at midnight can make the experience less distressing.
What Bowel Prep Does to Your Gut Bacteria
If you have ever wondered whether the aggressive colon flush required for colonoscopy disrupts your gut microbiome, the answer is yes — temporarily. A study tracking gut bacteria and metabolites found that immediately after bowel prep, the microbiome composition shifted so dramatically that the difference between a person’s pre-prep and post-prep samples was comparable to the difference between two entirely different people. However, by 14 days after the procedure, the microbiome had returned to its baseline state, and 32 metabolites that changed immediately after prep had all recovered.18PubMed Central. Effects of bowel preparation on the human gut microbiome and metabolome
A separate study looked specifically at whether colonoscopy prep with polyethylene glycol affected the microbiota beyond normal day-to-day variation, and concluded it did not.19PLoS ONE. Impact of Colonoscopy Bowel Preparation on Intestinal Microbiota These two findings are not as contradictory as they sound — the first study caught a sharp but short-lived disruption that resolved within two weeks, while the second concluded the prep didn’t push things beyond the range of normal temporal fluctuation. Either way, you do not need to panic about permanently wrecking your gut flora from a colonoscopy. Eating a varied diet in the weeks after the procedure should support a full recovery.
Eating After the Procedure
Post-endoscopy eating is usually straightforward, but reintroduction matters. After an upper endoscopy, most people can eat within an hour or two once the sedation wears off, starting with something bland and easy to swallow — soup, toast, crackers. Your throat may feel sore from the scope, so avoid anything sharp, very hot, or acidic until the irritation settles.
After a colonoscopy, the approach is similar: start gentle and progress. A study of post-polypectomy patients found that a structured dietary progression from liquids to semi-liquids to soft foods, tailored to individual tolerance, was a standard and effective recovery pathway.20PubMed Central. Targeted nutritional nursing versus routine dietary care on postoperative nutritional status and recovery outcomes in patients with gastrointestinal polyps: A retrospective controlled study If you had polyps removed, your doctor may give specific instructions about avoiding certain foods for a day or two to reduce the risk of bleeding at the removal site. Otherwise, most people are back to their normal diet within 24 hours. Prioritize fluids, since you are likely dehydrated from the prep, and ease back into fiber-rich foods gradually rather than diving straight into a large, heavy meal.
One thing many people don’t anticipate: you will probably be ravenously hungry after a colonoscopy, having eaten very little for more than a day. It is tempting to celebrate with a large restaurant meal on the way home. A better plan is to eat small amounts frequently for the first several hours, letting your digestive system restart at its own pace. Gas and bloating from the air used to inflate the colon during the procedure can persist for hours, and loading a big meal on top of that is a recipe for discomfort.