We describe an algorithm for determining a minimal Weierstrass equation for hyperelliptic curves over principal ideal domains. When the curve has a rational Weierstrass point w 0 , we also give a similar algorithm for determining the minimal Weierstrass equation with respect to w 0 .