Background: As endoscopy is an invasive and painful procedure, it is necessary to use a suitable sedative with a minimum dose, especially in children. Objectives: This study aimed to compare the effect of adding low-dose ketamine to dexmedetomidine and propofol on the quality of sedation and hemodynamic response in children during upper gastrointestinal endoscopy. Methods: This double-blind, randomized clinical trial was conducted on 52 children who were candidates for endoscopy in 2 groups, each consisting of 26 patients. In the first group (Ketadex group), infusion of dexmedetomidine (0.7 - 1 μg/kg) for 10 minutes and ketamine bolus (0.4 mg/kg) for anesthesia induction was prescribed. In the second group (Ketofol group), infusion of propofol (50 - 100 μg/kg) for 10 minutes and ketamine bolus (0.4 mg/kg) for anesthesia induction was prescribed. Results: The mean blood pressure of children decreased slightly during and after the endoscopic procedure in the Ketadex group than in the Ketofol group (P < 0.05). The recovery time was significantly less in the Ketofol group (41.85 ± 7.03 minutes) than in the Ketadex group (55.12 ± 7.55 minutes; P < 0.001). Conclusions: The addition of the low-dose ketamine to propofol and dexmedetomidine did not result in any significant changes in the level of sedation, the incidence of adverse effects, and the endoscopist’s satisfaction; however, the recovery time was shorter in the propofol-ketamine combination than in the dexmedetomidine-ketamine combination.