Although in vivo studies have explored the relationship between oral environment and microbial communities, a precise analysis of the effects of environmental pH on oral microbiota remains challenging owing to their complexity and external influences. This study aimed to investigate the effect of environmental pH on the structure and diversity of oral microbiota in vitro. Tongue coating samples from ten participants were cultured anaerobically at six pH levels (5.5–8.0) using adjusted media. After DNA extraction, high-throughput sequencing of the 16s rRNA V3–V4 region was performed. Microbial diversity was analyzed using alpha and beta diversity indices, and differential taxa were identified using linear discriminant analysis effect size (LEfSe). Alpha diversity analysis revealed reduced diversity at pH 5.5 and 8.0. Beta diversity revealed that microbial communities at pH 5.5, 7.5, and 8.0 were separated from those at pH 7.0. LEfSe identified bacterial species that were significantly altered at pH 5.5 and 8.0. Environmental pH significantly influences the diversity and composition of microbial communities, with substantial changes occurring under acidic or alkaline conditions. These findings provide deeper insight into how oral biofilms respond to pH variations, underscoring the critical role of pH in oral microbiota dynamics.