D-2-hydroxyglutarate (D-2-HG) is an oncometabolite that accumulates due to mutations in isocitrate dehydrogenase 1 and 2 (IDH1/2). D-2-HG may be used as a surrogate marker for IDH1/2 mutant cancers, yet simple and specific methods for D-2-HG detection are limited. Here, we present the development and characterization of a genetically encoded fluorescent sensor of D-2-HG (D2HGlo). D2HGlo responds to clinically relevant concentrations of D-2-HG, demonstrates exceptional selectivity and can quantify D-2-HG in various body fluids and glioma tumor supernatants. Additionally, analysis of tumor lysates using D2HGlo accurately predicted the IDH mutational status of gliomas. The successful quantification of D-2-HG within contrived samples suggests that D2HGlo may facilitate the detection and monitoring of IDH mutant cancers through liquid biopsies following further validation. In addition to D2HGlo's potential clinical utility, we also present findings for its adaptation to the cellular environment. To assess D-2-HG production in living immortalized glioma cells, we engineered D2HGlo sensors that localize to subcellular compartments, which yielded findings of elevated D-2-HG in the cytosol, mitochondria, and nucleus of IDH1 mutant cells. D2HGlo was used to perform a side-by-side comparison of cytosolic and secreted D-2-HG to reveal that glycolysis, but not glutamine catabolism, drives D-2-HG production in IDH1 mutant cells.