A slimy layer of mucus serves as the first line of defense against problematic microbes like the bacterial pathogen Pseudomonas aeruginosa. We have identified mucins, the major gel-forming components of mucus, and their complex sugar structures (glycans) as protective molecules that suppress microbial virulence traits including toxin secretion, bacterial communication, and surface attachment.