All animals and plants dynamically attach and remove O-linked beta-N-acetylglucosamine (O-GlcNAc) at serine and threonine residues on myriad nuclear and cytoplasmic proteins. O-GlcNAc cycling, which is tightly regulated by the concerted actions of two highly conserved enzymes, serves as a nutrient and stress sensor. On some proteins, O-GlcNAc competes directly with phosphate for serine/threonine residues. Glycosylation with O-GlcNAc modulates signalling, and influences protein expression, degradation and trafficking. Emerging data indicate that O-GlcNAc glycosylation has a role in the aetiology of diabetes and neurodegeneration.