The bacteria that cause the deadly respiratory disease have evolved into families of strains, or lineages, which may affect people differently.
To help identify the different origins and map how tuberculosis moves around the world, spreading from person to person through the air, the research team studied over 90,000 genetic mutations.
According to the study -- published in Nature Communications -- the researchers found that just 62 mutations are needed to code the global family of strains.
Dr Taane Clark, Reader in Genetic Epidemiology and Statistical Genomics at the London School of Hygiene & Tropical Medicine, who led the study, said: "There is increasing interest in new technologies that can assist those treating tuberculosis patients.
"This new barcode can be easily implemented and used to determine the strain-type that is a surrogate for virulence.
"We are making this information available to the doctors and scientists working with tuberculosis so that they can more easily know what strains they are dealing with."
Dr Ruth McNerney, TB expert and Senior Lecturer in Pathogen Biology and Diagnostics at the School, who was also part of the study, said: "New technology is making it easier to track mutations but genomes are very complicated and we hope this simple bar code will help people with their research."
Tuberculosis is a bacterial disease that often involves the lungs but can affect any part of the body. Untreated it is often fatal and TB kills an estimated 1.3 million people every year.
The World Health Organization estimates there are 12 million TB patients in the world and in the UK nearly 9,000 new cases are diagnosed every year. The disease can be carried around the world by people unaware they are infected. The bacterium that causes TB is called Mycobacterium tuberculosis.