An endoscopy is not painful for the majority of patients, but depends on the type of procedure and the reason for doing the endoscopy.