We propose a new non-perturbative method for studying UV complete unitary quantum field theories (QFTs) with a mass gap in general number of spacetime dimensions. The method relies on unitarity formulated as positive semi-definiteness of the matrix of inner products between asymptotic states (in and out) and states created by the action of local operators on the vacuum. The corresponding matrix elements involve scattering amplitudes, form factors and spectral densities of local operators. We test this method in two-dimensional QFTs by setting up a linear optimization problem that gives a lower bound on the central charge of the UV CFT associated to a QFT with a given mass spectrum of stable particles (and couplings between them). Some of our numerical bounds are saturated by known form factors in integrable theories like the sine-Gordon, E 8 and O(N) models.