MzJava is an open-source Java library for the analysis of mass spectrometry data. It provides algorithms and data structures for processing mass spectra and their associated biological molecules, such as small molecules, glycans, proteins, and peptides with post-translational modifications. MzJava includes methods to perform mass calculation, protein digestion, peptide and glycan fragmentation, MS/MS signal processing, and scoring for spectra-spectra and peptide/glycan-spectra matches.