xylib is a portable C++ library for reading files that contain x-y data from powder diffraction, spectroscopy, or other experimental methods. Supported formats include plain text (CSV or TSV), Crystallographic Information File for Powder Diffraction (pdCIF), Siemens/Bruker UXD, Siemens/Bruker RAW v1/2/3, Philips UDF, Philips RD (raw scan) V3, Rigaku DAT, Sietronics Sieray CPI, DBWS/DMPLOT data file, Canberra MCA, XFIT/Koalariet XDD, RIET7/LHPM/CSRIET/ILL_D1A5/PSI_DMC DAT, Vamas ISO14976, and Princeton Instruments WinSpec SPE.