First, I think that you have very confused ideas.
A unit vector is a vector of length one.
The length of a vector is the square root of the sum of the squares of its components. Another way: it is the square root of the dot product of the vector with itself.
To convert a vector to an equivalent( parallel) unit vector simply divide each component of the vector by the length of the vector.