Cariogenic biofilms produce strong acidic microenvironments, which is the primary cause of dental caries. Streptococcus mutans is a dominant species in cariogenic biofilms. Herein, we report a pH-responsive, charge-switching smart copolymer to selectively target and eradicate bacteria in cariogenic biofilms. To that end, the copolymer is designed to be activated in an acidic environment. The smart copolymer, Poly-1A, consists of ternary compositions of monomers with a cationic ethyl ammonium group, a carboxylic group, and a hydrophobic group in the side chains. The net charge of Poly-1A was charge neutral at neutral pH, but it switched to be cationic because the acidic carboxylate side chains were protonated and became neutral; however, the ammonium groups remained positive. Poly-1A with a net positive charge bound to the anionic surface of oral bacteria by electrostatic interactions and disrupted the bacterial membranes, causing bacterial death. Poly-1A reduced the cell viability of planktonic and biofilm S. mutans at pH 4.5, while it was not bactericidal at pH 7.4. Poly-1A did not reduce the cell viability of human gingival fibroblasts and periodontal ligament stem cells for a 1 h incubation.