In the title compound, C16H13N7O2, the 3,5-dimethylphenyl and 4-nitrophenyl rings are inclined to the central 2H-1,2,3-triazole ring by 1.80 (7) and 1.79 (7), respectively, and to one another by 2.16 (7). In the crystal, the molecules are linked by C—H. . . N hydrogen bonds and π–π stacking interactions [centroid-to-centroid distances = 3.7295 (9) and 3.7971 (9) Å], forming ribbons along the baxis direction. These ribbons are connected to each other by weak van der Waals interactions and the stability of the crystal structure is ensured. A Hirshfeld surface analysis of the crystal structure indicates that the most important contributions to the crystal packing are from HH (31.5%), NH/H. . .N (19.2%), OH/H/O (14.5%), N. . . C/C. . . C (10.9%) and C. . .H/HC (10.2%) contacts. © 2023 International Union of Crystallography. All rights reserved.