# How can convert affine to Jacobian coordinates?

I have a point in affine coordinates: $(x,y)$.

What should I do when I want to convert to $(X,Y,Z)$ in Jacobian coordinates? I need it for calculating ECC in a prime field.

When you go from Affine to Jacobian, $X$ and $Y$ stay the same, and $Z$ is equal to $1$
$(X',Y',Z') = (X,Y,1)$
$(X',Y') = (\frac{X}{Z^2}, \frac{Y}{Z^3} )$