It is a classical result of Sobolev spaces that any $H^1$ function has a well-defined
$H^{1/2}$ trace on the boundary of a sufficient regular domain. In this work, we present stronger
and more general versions of such a trace theorem
in a new nonlocal function space $\cS(\Omega)$ satisfying
$H^1(\Omega)\subset \cS(\Omega)\subset L^2(\Omega)$.
The new space $\cS(\Omega)$ is associated with a nonlocal norm characterized by
a nonlocal interaction kernel that is defined heterogeneously with a special
localization feature on the boundary. Through the heterogeneous localization,
we are able to show that the $H^{1/2}$ norm of the
trace on the boundary can be controlled by the nonlocal norm that are weaker than the
classical $H^1$ norm. In fact, the trace theorems can be essentially shown without
imposing any extra regularity of the function
in the interior of the domain other than being square integrable. Implications of
the new trace theorems to the coupling of local and nonlocal
equations and possible further generalizations are
also discussed.