The present study aimed to investigate the role of gastric mucosa for the secretion of interleukin (IL)-23 in chronic gastritis. One hundred and one patients were enrolled; 47 with duodenal ulcer, 33 with gastric ulcer and 31 with chronic gastritis. Biopsies were incubated in the absence/presence of endotoxins. Supernatants were collected and IL-23 and IL-1β were measured by enzyme-linked immunosorbent assay. Scoring of gastritis was performed according to the updated Sydney score. Patients with duodenal and gastric ulcer and those with chronic gastritis had similar scores of gastritis. IL-23 was higher in supernatants of tissue samples of Helicobacter pylori-positive than of H. pylori-negative patients. No differences were recorded in concentrations of IL-23 and IL-1β between patients with duodenal ulcer, gastric ulcer and chronic gastritis. Positive correlations were found between IL-23 of patients with both duodenal and gastric ulcer and chronic gastritis and the degree of infiltration of neutrophils and monocytes. Similar correlations were observed between IL-23 and IL-1β. IL-23 secreted by the gastric mucosa could be implicated in the pathogenesis of chronic gastritis. IL-23 was released in the presence of H. pylori from the inflamed gastric mucosa and followed the kinetics of IL-1β.