We present a combined study with time-domain terahertz and conventional far-infrared ellipsometry of the temperature dependent optical response of SrTiO3 thin films (82 and 8.5 nm) that are grown by pulsed-laser deposition on LSAT substrates. We demonstrate that terahertz ellipsometry is very sensitive to the optical response of these thin films, in particular, to the soft mode of SrTiO3. We show that for the 82 nm film the eigenfrequency of the soft mode is strongly reduced by annealing at 1200 • C, whereas for the 8.5 nm film it is hardly affected. For the latter, after annealing the mode remains at 125 cm −1 at 300 K and exhibits only a weak softening to about 90 cm −1 at 10 K. This suggests that this ultrathin film undergoes hardly any relaxation of the compressive strain due to the LSAT substrate.