The order of esterification of the eight hydroxyl groups of alpha,alpha-trehalose is HO-6.6' > HO-2.2' > HO-3.3' > HO-4.4'. Under the appropriate conditions of benzoylation, the heptabenzoate with HO-4' free was obtained in good yield (58%), along with the octabenzoate and the hexabenzoate having HO-4.4' free. The readily isolated heptabenzoate was a convenient starting material for the synthesis of 4-azido-4-deoxy- (84%) and 4-amino-4-deoxy-alpha-D-galactopyranosyl alpha-D-glucopyranoside, and the heptabenzoate of alpha-D-galactopyranosyl alpha-D-glucopyranoside with HO-4' free, which was used as a synthetic precursor of 4-azido-4-deoxy-alpha-D-glucopyranosyl alpha-D-glucopyranoside and its amino analogue.