Structure and functional study of glycans are highly challenging due to the difficulties in analyzing glycans and limited availability of samples for study. These limitations could be resolved by attaching DNA barcode to the glycan, which virtually represent glycan in further application, by increasing the sensitivity of detection by polymerase chain reaction (PCR), requiring minimal samples for analysis. Assuming bigger arena of DNA Encoded Glycan Libraries (DEGL) in future, we propose here a method for uniquely coding all glycans using computer program that can convert the structural information of glycans to DNA barcode. A unique and universal coding for glycans will benefit both synthesis and analysis of DEGLs. As a proof of principle study, a small DNA Encoded Glycan Library (DEGL) of blood and globo series glycan antigen and its application was demonstrated in detecting blood group and breast cancer from plasma