Linking numbers appear in local quantum field theory in the presence of tensor fields, which are closed two-forms on Minkowski space. Given any pair of such fields, it is shown that the commutator of the corresponding intrinsic (gauge invariant) vector potentials, integrated about spacelike separated, spatial loops, are elements of the center of the algebra of all local fields. Moreover, these commutators are proportional to the linking numbers of the underlying loops. If the commutators are different from zero, the underlying two-forms are not exact (there do not exist local vector potentials for them). The theory then necessarily contains massless particles. A prominent example of this kind, due to J.E. Roberts, is given by the free electromagnetic field and its Hodge dual. Further examples with more complex mass spectrum are presented in this article.