In this paper, we describe the implementation of support for time-of-flight (TOF) positron emission tomography (PET) for both listmode and sinogram data in the open source software for tomographic image reconstruction (STIR). We provide validation and performance characterization using simulated data from the open source GATE Monte Carlo toolbox, with TOF configurations spanning from 81.2 to 209.6 ps. The coincidence detector resolution was corrected for the timing resolution deterioration due to the contribution of the crystal length. Comparison between the reconstruction of listmode and sinogram data demonstrated good agreement in both TOF and non-TOF cases in terms of relative absolute error. To reduce the reconstruction time, we assesse...