In the title compound, C20H17N3O4S, all non-H atoms, except those of the phenyl ring, are approximately coplanar [maximum deviation = 0.2214 (1) Å], and the dihedral angle between their best plane and the benzene ring is 53.13 (1)°. A short intra-molecular O⋯S contact of 2.838 (1) Å is formed between the ester carbonyl O atom and the S atom of the thia-zolidine ring. In the crystal, mol-ecules associated via O-H⋯O, C-H⋯O and C-H⋯S hydrogen bonds form layers parallel to (010), with only C-H⋯O-type short contacts between the mol-ecules in adjacent layers.