In the structure of the title compound, C15H19N3O5S2, the bond lengths at the linking sulfur atom are significantly different [1.7473 (17) and 1.811 (2) Å], and the angle at the exocyclic nitrogen atom is wide at 128.45 (18)°. The interplanar angle between the tolyl and thiadiazole rings is 9.2 (1)°. The complex hydrogen-bonding pattern, involving five donors and five acceptors, can be broken down into a one-dimensional ribbon parallel to the b axis, involving hydrogen bonds of the sugar residues only, and a two-dimensional layer structure parallel to the ab plane, based on the N—H...O and O—H...N hydrogen bonds.