  Let $E$ be an arbitrary subset of $\mathbb{R}^n$ (not necessarily bounded),
and $f:E\to\mathbb{R}$, $G:E\to\mathbb{R}^n$ be functions. We provide necessary
and sufficient conditions for the $1$-jet $(f,G)$ to have an extension $(F,
\nabla F)$ with $F:\mathbb{R}^n\to\mathbb{R}$ convex and of class $C^{1}$.
Besides, if $G$ is bounded we can take $F$ so that $\textrm{Lip}(F)\lesssim
\|G\|_{\infty}$. As an application we also solve a similar problem about
finding convex hypersurfaces of class $C^1$ with prescribed normals at the
points of an arbitrary subset of $\mathbb{R}^n$.
