The title compound, C7H8N6O, represents the keto form and adopts a nearly planar structure (r.m.s. deviation of the non-H atoms = 0.072 Å). In the crystal, mol-ecules form spiral chains along the c axis by N-H⋯N hydrogen bonds. The chains are linked to each other by weak C-H⋯O hydrogen bonds, forming a three-dimensional framework.