The distinctive anatomy and physiology of the upper gastrointestinal tract and the difficulty of obtaining samples led to the theory that it was bacteria free. However, multiomics studies are indicating otherwise. Although influenced by both oral and gastric bacteria, the resident microbial ecosystem in the oesophagus is dominated by Streptococcus. A shift from Gram-positive to Gram-negative bacteria occurs in oesophagitis and Barrett's oesophagus, and this shift might be involved in the pathogenesis of oesophageal adenocarcinoma. The gastric microenvironment is populated by microbial communities mainly of the Firmicutes, Actinobacteria, Bacteroidetes, and Proteobacteria phyla and species of the Lactobacillus, Streptococcus, and Propionibacterium genera. The composition of gastric microbiota is highly dynamic, and is influenced by acid suppression, gastric inflammation, and Helicobacter pylori. Duodenal microbes are also implicated in the onset and outcome of coeliac disease. Bacteria of the genera Bacteroides, Clostridium, and Staphylococcus dominate the duodenal flora in active coeliac disease whereas lactobacilli and bifidobacteria decrease. Although knowledge of the composition of the microbiota of the upper gastrointestinal tract has advanced substantially, this information is far from being translated to the clinical setting. In this Review, we assess the data related to the potential contribution of microbes to the susceptibility for and pathogenesis of upper gastrointestinal diseases.