In this paper, via a new Hardy type inequality, we establish some cohomology vanishing theorems for free boundary compact submanifolds $$M^n$$ with $$n\ge 2$$ immersed in the Euclidean unit ball $$\mathbb {B}^{n+k}$$ under one of pinching conditions $$|\Phi |^2\le C$$ , $$|A|^2\le {\widetilde{C}}$$ or |\le R(p,|H|)$$ where A $$(\Phi )$$ is (traceless) second fundamental form, H mean curvature, ...