Abstract Background Early diagnosis of pathogenic bacteria is crucial for the treatment of community-acquired pneumonia (CAP), but conventional diagnostics are limited by sampling difficulties. Oral microbiota has also been explored as a noninvasive biomarker of lung diseases, but it’s role in CAP has been neglected. We aimed to investigate whether the oral bacteria can be novel non-invasive biomarkers for CAP. Methods Oral swab samples were collected from 29 patients with CAP and 26 healthy volunteers and characterized based on clinical parameters and 16S rRNA profiling of oral bacteria. A predict functional profiling was performed for the functional and metabolic changes in oral microbial communities. Results Oral microbial of patients with CAP had a lower diversity than healthy group. And the dominant bacteria were Streptococcus, Prevotella and Neisseria in CAP. Higher abundance of Prevotella (particularly Prevotella_melaninogenica ), Veillonella and Campylobacter , and lower abundance of Neisseria and Fusobacterium were detected in CAP group. Analysis of the functional potential of oral microbiota demonstrated that the pathway involving infectious disease was overrepresented in the CAP groups relative to that in the healthy controls. Conclusions Oral microbial dysbiosis was found in patients with CAP, supporting the use of this non-invasive specimen for biomarkers of CAP. Highlights Oral microbial diversity was significantly lower in community-acquired pneumonia (CAP) patients than healthy controls. Genera Neisseria and Fusobacterium were decreased, while genera Prevotella, Veillonella and Campylobacter were increased in CAP versus healthy controls. Oral microbiota-based biomarkers can serve as a promising non-invasive tool for the detection of CAP.