MathOverflow will be down for maintenance for approximately 3 hours, starting Monday evening (06/24/2013) at approximately 9:00 PM Eastern time (UTC-4).

The answer to 2 is yes. Let $(X,d)$ be complete but not compact, then for some $r>0$ it has a countable r-separated subset $S=\{s_i\}:i=1,2,\dots$. Let $d'$ be the maximal metric on $X$ satisfying $d'\le d$ and $d'(s_i,s_j)\le r/\min(i,j)$ for all $i,j$. Then $(X,d')$ is homeomorphic to $(X,d)$ - in fact, the identity map is a local isometry - but $d'$ is not complete. So we have embedded the space into the completion of $(X,d')$ as a non-closed subset.

The metric $d'$ can be constructed explicitly: $d'(x,y)$ is the minimum of $d(x,y)$ and the infimum of sums $d(x,s_i)+d(x,s_j)+r/\min(i,j)$ over all pairs of $i,j$. Verifying the triangle inequality is straightforward.

As for 3, the answer is no, because you cannot embed any complete space into a compact space. For example, a non-separable Banach space cannot be so embedded, as Qiaochu Yuan explained in comments.

Update. It seems that I misunderstood Q3. As stated, it asks whether every compact space can be embedded into a complete non-compact one. The answer is of course yes, as Ady noticed.

1

The answer to 2 is yes. Let $(X,d)$ be complete but not compact, then for some $r>0$ it has a countable r-separated subset $S=\{s_i\}:i=1,2,\dots$. Let $d'$ be the maximal metric on $X$ satisfying $d'\le d$ and $d'(s_i,s_j)\le r/\min(i,j)$ for all $i,j$. Then $(X,d')$ is homeomorphic to $(X,d)$ - in fact, the identity map is a local isometry - but $d'$ is not complete. So we have embedded the space into the completion of $(X,d')$ as a non-closed subset.

The metric $d'$ can be constructed explicitly: $d'(x,y)$ is the minimum of $d(x,y)$ and the infimum of sums $d(x,s_i)+d(x,s_j)+r/\min(i,j)$ over all pairs of $i,j$. Verifying the triangle inequality is straightforward.

As for 3, the answer is no, because you cannot embed any complete space into a compact space. For example, a non-separable Banach space cannot be so embedded, as Qiaochu Yuan explained in comments.