In the title zwitterionic compound, C(16)H(8)N(4)O(4), the dihedral angle between the carboxyl and carboxyl-ate groups is 72.14 (2)°. In the crystal, mol-ecules are linked by strong inter-molecular O-H⋯O(-) and N(+)-H⋯O(-) hydrogen bonds into double chains extended along [001]. These chains are additionally stabilized by π-π stacking inter-actions between the pyridine and benzene rings [centroid-centroid distance = 3.5542 (8) Å].