Stands for "Universally Unique Identifier." A UUID is a 128-bit number used to identify a unique object on a computer system. Examples include objects in software programs, parameters in URLs, and labels of individual hardware devices.
Most UUIDs are represented in hexadecimal notation, using 32 characters, separated by four hyphens. Below is an example UUID:
While there are several ways to generate a UUID, the first string of characters are typically based on the timestamp (the current time) of the host system. The first UUID standard (version 1), commonly used in the 1990s, had the following format:
- first 8 characters - "low" 32 bits of the timestamp
- next 4 characters - "middle" 16 bits of the timestamp
- next 4 characters - "high" 16 bits of the timestamp
- next 4 characters - 16-bit "variant" in the clock sequence
- final 12 characters - 48-bit host ID
Combining a random 48-bit host ID with a 64-bit timestamp and a 16-bit "variant" value makes it almost impossible for two UUIDs to be identical. Using the fourth version of the UUID standard (UUID4), the chances of generating two equal UUIDs is 1 in 1037. Even if millions of UUIDs are generated every second, it is unlikely a duplicate UUID will be created for several decades.
UUID vs GUID
In most cases, UUID and GUID are synonymous. A GUID (Globally Unique Identifier) has the same number of digits and the same format as a UUID. However, Microsoft often uses the term GUID (rather than UUID) to refer to unique identifiers on Windows devices. The Microsoft .NET Framework includes the function NewGuid(), which generates a GUID within a software program.
Updated: October 23, 2020