Laser-induced fluorescence (LIF) is a non-invasive optical diagnostics technique frequently used in reactive media to measure physical properties such as gas-phase species concentrations and temperature. It provides important information for understanding reaction and transport processes. For deriving detection schemes that provide selective and quantitative information, fluorescence spectra of the species of interest as well as potential interference sources must be simulated. LIFSim 4.0 is a modular software for simulating absorption, LIF excitation, and LIF emission spectra of NO, SiO, OH, and O2 that also can be extended by the user to include other species. Line positions, line broadening, and collisional quenching are calculated based on spectroscopic data from literature. The code provides spectral analysis tools to interrogate and analyze sensitive spectral regions suitable for derivation of temperature from multi-line LIF measurements. The library includes fitting functions optimized for enhancing and accelerating the post-processing of stacked LIF images with varied excitation wavelength for temperature imaging and separation of the target LIF signal from broad-band or scattering background as well as tools for assessing the validity of results in non-ideal measurement situations.