The cross section for $\mathrm{t \bar{t}}$ production in the all-jets final state is measured in pp collisions at a centre-of-mass energy of 8 TeV at the LHC with the CMS detector, in data corresponding to an integrated luminosity of 18.4 fb$^{-1}$. The inclusive cross section is found to be 275.6 $\pm$ 6.1 (stat) $\pm$ 37.8 (syst) $\pm$ 7.2 (lum) pb. The normalized differential cross sections are measured as a function of the top quark transverse momenta, $ p_{\mathrm{T}} $, and compared to predictions from quantum chromodynamics. The results are reported at detector, parton, and particle levels. In all cases, the measured top quark $ p_{\mathrm{T}} $ spectra are significantly softer than theoretical predictions.The cross section for $\mat...