Although upper gastrointestinal endoscopy is generally a safe procedure, it is known to be associated with arterial oxygen desaturation. We studied 82 patients undergoing diagnostic upper gastrointestinal endoscopy following a standard pre-medication consisting of xylocaine throat spray and intravenous midazolam. The mean duration of endoscopy was 8.5 ± 0.42 min and the mean dose of midazolam was 6.3 ± 0.15 mg. The baseline SaO2 was 94.91 ± 0.27% and it decreased after pre-medication to 92.84 ± 0.40% (p < 0.001) and after intubation to 91.21 ± 0.40% (p < 0.001). A fall greater than 4% saturation occurred for 15.68% of the total endoscopy time. SaO2 < 90% was seen for 16.7% and SaO2 < 85% occurred for 2.33% total endoscopy time. In patients >65 years old, hemoglobin <10 g/dl, or body mass index >28, the baseline saturation was significantly lower and a reduced SaO2 was seen throughout the procedure. We identify old age, anemia, and obesity as independent risk factors for arterial oxygen desaturation. We recommend continuous monitoring before sedation, and giving supplemental oxygen to patients with these risk factors from the outset of upper gastrointestinal endoscopy.