Preparing galactosylated derivatives of non-steroidal antiinflammatory drugs with free acid function comprises esterifying carboxyl group with sixth hydroxyl group of galactose, and deprotecting the sugar using trifluoroacetic acid.