In the hydrogen phthalate anion of the title molecular salt, C6H10N3O+·C8H5O4−, the dihedral angles formed by the benzene ring and the mean planes of the –COOH and –COO− groups are 16.1 (3) and 19.8 (3)°, respectively. There is an intramolecular O—H...O hydrogen bond in the anion generating an S(7) ring motif. In the crystal, the protonated N atom of the pyrimidinium ring and the 2-amino group of the cation are hydrogen bonded to the carboxylate O atoms of the anion via a pair of N—H...O hydrogen bonds, forming an R22(8) ring motif. The ion pairs are further connected via N—H...O and C—H...O hydrogen bonds, forming ribbons parallel to the [01-1] direction. The ribbons are linked by off-set π–π stacking interactions [intercentroid distances = 3.8279 (16) and 3.6074 (15) Å], forming a three-dimensional structure.