Objective To investigate the safety and efficacy of remimazolam tosilate for painless gastroscopy in elderly patients.Methods One hundred fifty-four elderly patients undergoing painless gastroscopy were evenly divided into a propofol group(P group,propofol 1.5 mg/kg+sufentanil 0.15 µg/kg anesthesia)and a remimazolam tosilate group(R group,remimazolam tosilate 0.2 mg/kg+sufentanil 0.15 μg/kg anesthesia).Gastroscopy was performed when the Observers Assessment of Alertness/Sedation(MOAA/S)score was≤1.If movement occurred during the procedure,an additional 1/3 of the initial dose of propofol or remimazolam tosilate was administered.General clinical data,vital signs[systolic blood pressure(SBP),diastolic blood pressure(DBP),heart rate(HR),pulse oximetry saturation(SpO2),respiratory rate(RR)],rates of respiratory depression,efficacy,and safety indicators were collected and compared between the two groups.Results There was no significant difference in general clinical data between the two groups(P>0.05).The sedation success rate was 100%for both groups.The R group showed a lower rate of RR<8 times/min(P<0.001)and significant differences in the minimum values of RR and SpO2(P<0.05).The incidence of injection pain was significantly lower in the R group(P<0.001).Conclusion Remimazolam tosilate can be used effectively and safely for painless gastroscopy in elderly patients.