© 2014 ESO. The Planck High Frequency Instrument (HFI) spectral response was determined through a series of ground based tests conducted with the HFI focal plane in a cryogenic environment prior to launch. The main goal of the spectral transmission tests was to measure the relative spectral response (includingthe level of out-of-band signal rejection) of all HFI detectors to a known source of electromagnetic radiation individually. This was determined by measuring the interferometric output of a continuously scanned Fourier transform spectrometer with all HFI detectors. As there is no on-board spectrometer within HFI, the ground-based spectral response experiments provide the definitive data set for the relative spectral calibration of the HFI. Knowledge of the relative variations in the spectral response between HFI detectors allows for a more thorough analysis of the HFI data. The spectral response of the HFI is used in Planck data analysis and component separation, this includes extraction of CO emission observed within Planck bands, dust emission, Sunyaev-Zeldovich sources, and intensity to polarization leakage. The HFI spectral response data have also been used to provide unit conversion and colour correction analysis tools. While previous papers describe the pre-flight experiments conducted on the Planck HFI, this paper focusses on the analysis of the pre-flight spectral response measurements and the derivation of data products, e.g. band-average spectra, unit conversion coefficients, and colour correction coefficients, all with related uncertainties. Verifications of the HFI spectral response data are provided through comparisons with photometric HFI flight data. This validation includes use of HFI zodiacal emission observations to demonstrate out-of-band spectral signal rejection better than 108. The accuracy of the HFI relative spectral response data is verified through comparison with complementary flight-data based unit conversion coefficients and colour correction coefficients. These coefficients include those based upon HFI observations of CO, dust, and Sunyaev-Zeldovich emission. General agreement is observed between the ground-based spectral characterization of HFI and corresponding in-flight observations, within the quoted uncertainty of each; explanations are provided for any discrepancies.