Let <i>M</i> be a compact connected (topological) manifold of finite- or infinite-dimension <i>n</i>. Let 0 <i>r</i> 1 be arbitrary but fixed. We construct in this paper a space-filling curve <i>f</i> from [0,1] onto <i>M</i>, under which <i>M</i> is the image of a compact set <i>A</i> of Hausdorff dimension <i>r</i>. Moreover, the restriction of f to <i>A</i> is one-to-one over the image of a dense subset provided that 0 <i>r</i> log|2<sup><i>n</i></sup>/log(2<sup><i>n</i></sup> + 2). The proof is based on the special case where <i>M</i> is the Hilbert cube [0,1]<sup></sup>.