We have performed terahertz time-domain spectroscopy measurements on three types of polystyrene foam. We find that between 0.2 and 4 THz, the extinction of this material is low and that it has a remarkably low refractive index of 1.017 to 1.022 in this range, with little variation as a function of frequency. In foam produced with HCFC 142b gas (1-chloro-1,1-difluoroethane) as the blowing agent, we find an additional absorption band at 0.5 THz caused by rotational transitions in this gas. The low extinction and refractive index make polystyrene foam a very suitable material to be used as a dichroic filter that blocks the near-IR and transmits THz radiation with small losses of less than 1.5 cm Ϫ1 for frequencies of Ͻ4 THz, and as a substrate for THz imaging.