Globally Unique Identifier (GUID)


What is a GUID? GUIDs are large, enormous numbers that are usually 128 bits long and look like this in hexadecimal: 27d602e0-b1c5-11e7-8f1a-0800200c9a66. GUIDs are 16 bytes long. For a webpage that explains the theory behind hexadecimal, have a look at an article called Number Systems and Bases at Better Explained.

The format is a well-defined sequence of 32 hex digits grouped into chunks of 8-4-4-4-12. This gives us 2^128 or about 10^38 numbers. That’s 38 digits long. How big is that. Suppose half the people on the planet were assigned 1000 of their own GUIDs per second for a year, would we get two GUIDs the same, even once? There are about 31 million seconds in a year. 31 million seconds times 1000 GUIDs per second is 31 billion GUIDs per person per year. Multiply that by 3 billion people to get 9 x 10^19. That’s not even close to the number of possible different GUIDs meaning that you have a much better chance of winning the lottery than for there to be a duplicate GUID in this scenario. 10^19 is about the same number of grains of sand in the world. There are about 10^27 atoms in your body. There are more unique GUIDs.

GUIDs are not tied to people or anything. A GUID can be used for to identify anything.

GUID Uses

GUIDs could be used as primary keys in a database. This lets database items created on separate machines be merged later without conflict, and without the need for a central server to manage IDs.

There are lots of other uses but if you using them to uniquely identify items, you don’t need a central authority to hand the GUIDs out. People can just randomly create and use their own GUIDs.

Leave a comment

Your email address will not be published. Required fields are marked *