The CHIANTI spectral code consists of two parts: an atomic database and a suite of computer programs, written in both the Python and IDL languages. Together, they allow the calculation of the optically thin spectrum of astrophysical objects and application of spectroscopic plasma diagnostics to astrophysical spectra. The database includes atomic energy levels; wavelengths; radiative transition probabilities; collision excitation rate coefficients; ionization and recombination rate coefficients; and data to calculate free-free, free-bound, and two-photon continuum emission. All data and programs are freely available at and in SolarSoft, while the Python interface to CHIANTI can be found at