X-gal is often used in molecular biology to test for the presence of an enzyme, β-galactosidase, in the place of its usual target, a β-galactoside.
X-gal is one of many indoxyl glycosides and esters that yield insoluble blue compounds similar to indigo dye as a result of enzyme-catalyzed hydrolysis.
[3][4] X-gal is an analog of lactose, and therefore may be hydrolyzed by the β-galactosidase enzyme which cleaves the β-glycosidic bond in D-lactose.
In gene cloning, X-gal is used as a visual indication of whether a cell expresses a functional β-galactosidase enzyme in a technique called blue/white screening.
Both genes by themselves produce non-functional peptides, however, when expressed together, as when a plasmid containing lacZα is transformed into a lacZΔM15 cells, they form a functional β-galactosidase.
[8] X-gal has a number of variants, which are similar molecules with slight differences serving mainly to produce colors other than blue as a signal.
If the promoter is linked to a lacZ gene, the production of β-galactosidase, which results in the formation of blue-pigmented colonies in the presence of X-gal, will therefore indicate a successful interaction between proteins.