Mucins are large gel-forming polymers inside the mucus barrier that inhibit the yeast-to-hyphal transition of Candida albicans, a key virulence trait of this important human fungal pathogen. However, the molecular motifs in mucins that inhibit filamentation remain unclear despite their potential for therapeutic interventions. Here, we determined that mucins display an abundance of virulence-attenuating molecules in the form of mucin O-glycans. We isolated and cataloged >100 mucin O-glycans from three major mucosal surfaces and established that they suppress filamentation and related phenotypes relevant to infection, including surface adhesion, biofilm formation and cross-kingdom competition between C. albicans and the bacterium Pseudomonas aeruginosa. Using synthetic O-glycans, we identified three structures (core 1, core 1 + fucose and core 2 + galactose) that are sufficient to inhibit filamentation with potency comparable to the complex O-glycan pool. Overall, this work identifies mucin O-glycans as host molecules with untapped therapeutic potential to manage fungal pathogens.