GTP + 4 H2O = 2,5-diamino-6-hydroxy-4-(5-phosphoribosylamino)-pyrimidine + formate + 3 H(+) + 2 phosphate Cofactor biosynthesis; riboflavin biosynthesis; 5-amino-6-(D-ribitylamino)uracil from GTP. Belongs to the GTP cyclohydrolase II family.