The synthesis of thioglycosides has been achieved in a high yielding process employing thionocarbamates prepared from protected reducing sugars and N-alkyl isothiocyanate in the presence of a non-nucleophilic base (K2CO3). In the key step of the synthesis, thionocarbamates were treated with Lewis acid (TMSOTf) to give O,S-rearrangement products that were applied to the synthesis of both anomers of heteroaryl thioglycosides.