In the title compound, C16H11NO2S2, the dihedral angles between the heterocyclic ring and the phenyl and anilinic benzene rings are 9.68 (13) and 79.26 (6)°, respectively, and an intramolecular C—H⋯S interaction occurs. In the crystal, inversion dimers linked by pairs of O —H⋯O hydrogen bonds occur, leading to R
2
2(10) loops, and C—H⋯O and weak C—H⋯π interactions further consolidate the packing.