Mass spectral libraries (or "spectral libraries" for short hereafter) are collections of fragment ion mass spectra and their originating analytes (if known) that are intended to be used as a reference for future spectral analysis. An MS2 spectrum records the characteristic fragmentation patterns of an analyte, in terms of mass-to-charge ratios and abundances of fragment ions that reproducibly occur when the analyte is fragmented in the mass spectrometer by one of various methods. Because of this, mass spectral libraries have important applications in analytical chemistry, particularly in the fields of proteomics and metabolomics/lipidomics. In proteomics, spectral libraries are generally compiled from a large amount of data acquired on complex protein mixtures. Often the data were acquired to answer various biological questions as a primary goal, rather than to generate spectral libraries. In metabolomics and lipidomics, spectral libraries are more often generated by injecting pure analytes onto the mass spectrometer, thereby conclusively linking the MS2 spectrum and the analyte. This requires the dedicated effort by library builders, most notably the National Institute of Standards and Technology (NIST) of the United States Government, some academic groups (e.g. METLIN spectral libraries) and vendors of mass spectrometers.