CD4 T cells are key for priming and regulating immune recognition of infected and cancer cells, but predictions of class II epitopes have limited accuracy. We profiled over 100’000 HLA-II ligands by Mass Spectrometry and developed a novel motif deconvolution algorithm to analyze these data. Our work demonstrates substantial improvements in the definition of HLA-II binding motifs and enhanced accuracy in HLA-II ligand and class II epitope predictions.