We determine the d + 1 dimensional topological field theory, which encodes the higher-form symmetries and their 't Hooft anomalies for d-dimensional QFTs obtained by compactifying M-theory on a non-compact space X. The resulting theory, which we call the Symmetry TFT, or SymTFT for short, is derived by reducing the topological sector of 11d supergravity on the boundary ∂X of the space X. Central to this endeavour is a reformulation of supergravity in terms of differential cohomology, which allows the inclusion of torsion in cohomology of the space ∂X, which in turn gives rise to the background fields for discrete (in particular higher-form) symmetries. We apply this framework to 7d super-Yang Mills, where X = C 2 /Γ ADE , as well as the Sasaki-Einstein links of Calabi-Yau three-fold cones that give rise to 5d superconformal field theories. This M-theory analysis is complemented with a IIB 5-brane web approach, where we derive the SymTFTs from the asymptotics of the 5-brane webs. Our methods apply to both Lagrangian and non-Lagrangian theories, and allow for many generalisations.