Catalyzes the dephosphorylation of 5-amino-6-(5-phospho-D-ribitylamino)uracil, and thus could be involved in the riboflavin biosynthesis pathway (PubMed:24123841). Is also able to dephosphorylate flavin mononucleotide (FMN), erythrose 4-phosphate and other phosphoric acid esters (PubMed:15808744, PubMed:16990279, PubMed:24123841). 5-amino-6-(5-phospho-D-ribitylamino)uracil + H2O = 5-amino-6-(D-ribitylamino)uracil + phosphate Magnesium. Can also use other divalent metal cations as manganese, cobalt or zinc. Optimum pH is 6-7.5. Cofactor biosynthesis; riboflavin biosynthesis; 5-amino-6-(D-ribitylamino)uracil from GTP: step 4/4. Cells lacking this gene can grow in the absence of exogenous riboflavin; this may be due to the presence of the functionally redundant protein YigB. Belongs to the HAD-like hydrolase superfamily. Cof family.