Background: Remimazolam has shown similar or even superior properties to propofol in procedural sedation in adults, but few studies have been conducted in pediatric populations. Thus, we aimed to compare the effect and safety of remimazolam and propofol combined with low dose esketamine for pediatric same-day bidirectional endoscopy (BDE).Methods: Pediatrics <18 years scheduled for elective BDE under sedation were included and randomly assigned to remimazolam group (R group) or propofol group (P group). The primary outcome was the success rate of sedation. Secondary outcomes include sedation-related information and adverse events. Mean arterial pressure (MAP), heart rate (HR), and perfusion index (PI) were recorded during sedation.Results: A total of 106 patients were enrolled and analyzed. The success rate of sedation was 100% in both groups. Compared with the P group, the induction time of the R group was significantly prolonged (p < 0.001), and the incidence of injection pain, intraoperative respiratory depression, hypotension and bradycardia was significantly lower (p < 0.001). The changes in MAP, HR and PI were relatively stable in the R group compared with the P group. Additionally, awake time significantly decreased with age by approximately 1.12 index points for each increase in age in the P group (p = 0.002) but not in the R group (p > 0.05). Furthermore, the decline in PI and PI ratio during BDE was related to body movement in the P group.Conclusion: Remimazolam combined with low dose esketamine has a non-inferior sedative effect than propofol for pediatric BDE, with no injection pain, less respiratory depression, more stable hemodynamics. Moreover, early detection of the decline in PI may avoid harmful stimulation under light anesthesia.Clinical trial registration:https://www.clinicaltrials.gov/study/NCT05686863?id=NCT05686863&rank=1, NCT05686863