We describe the synthesis of N- and S-glycosides derived from D-galactopyranose in which the aglycon bears certain reactive groups. In a first series, the anomeric carbon is linked to an amino group that is acylated by a functionalized succinic acid chain. The terminal group of the aglycon moiety is a hydrazide function which can be converted by ultraviolet light irradiation into an azide and a nitrene. Alternatively, the terminal group is a diazoketone function which can be converted into a carbene, by ultraviolet light irradiation. A second series comprises glycosides of 1-thio-β-D-galactopyranose. The aglycon consists of a 6-carbon chain with a carboxylic end group. The latter has been converted into a hydrazide and diazoketone function. We show that the diazo group of the diazoketones (compounds 5 and 12) is susceptible to decomposition by ultraviolet irradiation, being nearly quantitatively decomposed after 3 minutes. These compounds add to a growing list of hexose derivatives which can be used in the field of photoaffinity-labeling of the sugar binding sites of certain lectins and of hexose transport systems, or to prepare modified proteins or ligands for affinity chromatography.