Esophagectomy or pancreaticoduodenectomy is the standard surgical approach for patients with malignant tumors of the esophagus or pancreatic head. These procedures are associated with high morbidity rates, which are strongly correlated with the occurrence of anastomotic leakage. Current diagnostic methods, including clinical, biochemical and radiological techniques are frequently inconclusive. Delay in diagnosis leads to delay in treatment, which ratifies the need for development of novel and accurate non-invasive diagnostic tests for detection of anastomotic leakage. Urinary volatile organic compounds reflect the metabolic status of an individual, which is associated with a systemic immunological response. The aim of this study was to determine the diagnostic accuracy of urinary volatile organic compounds to detect anastomotic leakage after esophagectomy or pancreaticoduodenectomy in an early phase.