  In this article we establish an asymptotic formula for the number of rational
points, with bounded denominators, within a given distance to a compact
submanifold $\mathcal{M}$ of $\mathbb{R}^M$ with a certain curvature condition.
Our result generalises earlier work of Huang for hypersurfaces [J.-J. Huang,
The density of rational points near hypersurfaces, Duke Math. J. 169 (2020),
2045--2077.], as our curvature condition reduces to Gaussian curvature being
bounded away from $0$ when $M - dim \mathcal{M} = 1$. An interesting feature of
our result is that the asymptotic formula holds beyond the conjectured range of
the distance to $\mathcal{M}$. Furthermore, we obtain an upper bound for the
number of rational points on $\mathcal{M}$ with additional power saving to the
bound in the analogue of Serre's dimension growth conjecture for compact
submanifolds of $\mathbb{R}^M$ when $M - dim \mathcal{M} > 1$.
