The title compound, C17H15N7O4, is a push-pull non-linear optical chromophore containing a di-alkyl-amino donor group and the di-cyano-imidazolyl acceptor separated by a π-conjugated path. The benzene and imidazole rings are not coplanar, making a dihedral angle of 10.0 (2)°. In the crystal, mol-ecules are linked by an extended set of hydrogen bonds and several motifs are recognized. Pairs of mol-ecules are held together by hydrogen bonding between carb-oxy O-H donor groups and diazenyl N-atom acceptors, forming R 2 (2)(24) ring patterns across inversion centres. Four-mol-ecule R 4 (4)(28) ring motifs are formed, again across inversion centres, through hydrogen bonding involving carb-oxy O-H donor groups and diazenyl and imidazole N-atom acceptors. Four-mol-ecule R 4 (4)(42) patterns are formed among mol-ecules related by translation and involve carb-oxy O-H and imidazole N-H donor groups with carbonyl O-atom and imidazole N-atom acceptors.