Background and study aims It is important to examine the pharynx during upper gastrointestinal endoscopy. Pharyngeal anesthesia using topical lidocaine is generally used as pretreatment. In Japan, lidocaine viscous solution is the anesthetic of choice, but lidocaine spray is applied when the former is considered insufficient. However, the relationship between the extent of pharyngeal anesthesia and accuracy of observation is unclear. We compared the performance of lidocaine spray alone versus lidocaine spray combined with lidocaine viscous solution for pharyngeal observation during transoral endoscopy. Patients and methods In this prospective, double-blinded, randomized clinical trial conducted between January and March 2015, 327 patients were randomly assigned to lidocaine spray alone (spray group, n = 157) or a combination of spray and viscous solution (combination group, n = 170). We compared the number of pharyngeal observable sites (non-inferiority test), pain by visual analogue scale, observation time, and the number of gag reflexes between the two groups. Results The mean number of images of suitable quality taken at the observable pharyngeal sites in the spray group was 8.33 (95 % confidence interval [CI]: 7.94 - 8.72) per patient, and 8.77 (95 % CI: 8.49 - 9.05) per patient in the combination group. The difference in the number of observable pharyngeal sites was - 0.44 (95 % CI: - 0.84 to - 0.03, P = 0.01). There were no differences in pain, observation time, or number of gag reflexes between the 2 groups. Subgroup analysis of the presence of sedation revealed no differences between the two groups for the number of pharyngeal observation sites and the number of gag reflexes. However, the number of gag reflexes was higher in the spray group compared to the combination group in a subgroup analysis that looked at the absence of sedation. Conclusions Lidocaine spray for pharyngeal anesthesia was not inferior to lidocaine spray and viscous solution in terms of pharyngeal observation. It was considered that lidocaine viscous solution was unnecessary for pharyngeal observation. UMIN000016073.