An engineered protein biosensor has been developed that can detect changes in O-GlcNAc levels using Förster resonance energy transfer. This sensor consists of four components linked together in the following order: cyan fluorescent protein (CFP), an O-GlcNAc binding domain (based on GafD, a lectin sensitive for terminal β-O-GlcNAc), a CKII peptide that is a known OGT substrate, and yellow fluorescent protein (YFP). Upon O-GlcNAcylation of the CKII peptide, the GafD domain binds the O-GlcNAc moiety, bringing the CFP and YFP domains into close proximity and generating a FRET signal. Generation of this signal is reversible and can be used to monitor O-GlcNAc dynamics in response to various treatments. This sensor may be genetically encoded and used in cells. Addition of a localization sequence allows for targeting of this O-GlcNAc sensor to the nucleus, cytoplasm, or plasma membrane.