This document provides guidelines from the European Society of Gastrointestinal Endoscopy (ESGE) for the diagnosis and management of nonvariceal upper gastrointestinal hemorrhage (NVUGIH). It recommends immediate assessment of patients' hemodynamic status and volume replacement if unstable. It also recommends early upper endoscopy within 24 hours of presentation to determine the source of bleeding and apply endoscopic hemostasis as needed. The guidelines provide recommendations on risk stratification, medication management, endoscopic diagnosis and treatment options for various bleeding lesions.