Trehalose-6-phosphate phosphatase (T6PP) catalyzes the dephosphorylation of trehalose 6-phosphate (T6P) to the disaccharide trehalose. The enzyme is not present in mammals but is essential to the viability of multiple lower organisms as trehalose is a critical metabolite, and T6P accumulation is toxic. Hence, T6PP is a target for therapeutics of human pathologies caused by bacteria, fungi, and parasitic nematodes. Here, we report the X-ray crystal structures of Salmonella typhimurium T6PP (StT6PP) in its apo form and in complex with the cofactor Mg2+ and the substrate analogue trehalose 6-sulfate (T6S), the product trehalose, or the competitive inhibitor 4-n-octylphenyl α-d-glucopyranoside 6-sulfate (OGS). OGS replaces the substrate phosphoryl group with a sulfate group and the glucosyl ring distal to the sulfate group with an octylphenyl moiety. The structures of these substrate-analogue and product complexes with T6PP show that specificity is conferred via hydrogen bonds to the glucosyl group proximal to the phosphoryl moiety through Glu123, Lys125, and Glu167, conserved in T6PPs from multiple species. The structure of the first-generation inhibitor OGS shows that it retains the substrate-binding interactions observed for the sulfate group and the proximal glucosyl ring. The OGS octylphenyl moiety binds in a unique manner, indicating that this subsite can tolerate various chemotypes. Together, these findings show that these conserved interactions at the proximal glucosyl ring binding site could provide the basis for the development of broad-spectrum therapeutics, whereas variable interactions at the divergent distal subsite could present an opportunity for the design of potent organism-specific therapeutics.