In the title compound, C21H22N4O2S, the dihedral angle between the pyrazole ring and adjacent benzene ring is 6.4 (1)°. The molecular conformation is influenced by intramolecular N—H...O and C—H...O hydrogen bonds. In the crystal, N—H...O hydrogen bonds plus C—H...π and π–π stacking interactions form chains extending in the a-axis direction. The chains are linked by complementary pairs of C—H...π interactions.