We study the unoccupied electronic structure of the spin- quantum magnet TiOCl using x-ray absorption near-edge spectroscopy (XANES) at the Ti L and O K edges. We acquire data both in total electron and fluorescence yield modes (TEY and FY, respectively). While only the latter allows us to access the unconventional low-temperature spin–Peierls (SP) phase of TiOCl, the signal is found to suffer from significant self-absorption in this case. Nevertheless, we conclude from FY data that effects of the SP distortion on the electronic structure are absent in the incommensurate intermediate phase within experimental accuracy. The similarity of room-temperature FY and TEY data, the latter not being obscured by self-absorption, allows us to use TEY spectra for comparison with simulations. These are performed by means of cluster calculations in D4h and D2h symmetries using two different codes. We extract values of the crystal-field splitting and parameterize our results using the commonly seen notation of Slater, Racah and Butler. In all cases, good agreement with published values from other studies is found.