Definition

GUID (global unique identifier)

What is GUID?

A GUID (globally unique identifier) is a 128-bit text string that represents an identification (ID). Organizations generate GUIDs when a unique reference number is needed to identify information on a computer or network. A GUID can be used to ID hardware, software, accounts, documents and other items. The term is also often used in software created by Microsoft.

GUIDs are useful when a unique identifier is needed that has a very low probability of being repeated. The text string can be used across all computers and networks. GUIDs are like serial numbers, as organizations use them to ensure database records are not duplicated and all data has an ID that is unique across different databases.

GUID was a term first used by Microsoft to refer to a specific variant of a similar term, Universally Unique Identifier, or UUID. Since then, the terms have been combined, with the RFC 4122 specification using them synonymously. Different versions of GUIDs follow the RFC 4122 specification.

How does GUID work?

GUIDs are constructed in a sequence of digits that equal 128 bits. The ID is in hexadecimal digits, meaning it uses the numbers 0 through 9 and letters A through F. The hexadecimal digits are grouped in a format that is 36 characters long -- 32 hexadecimal characters grouped as 8-4-4-4-12 and separated by four hyphens: {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}.

Users do not need to rely on a centralized authority to administer GUIDs, as anyone can use a generation algorithm to create a GUID. Individuals and organizations can create GUIDs using a free GUID generator that is available online. An online generator constructs a unique GUID according to RFC 4122. When creating a GUID, users should note the timestamp, clock sequence and the node ID -- such as a Media Access Control (MAC) address.

An example of a GUID
This image shows an example of a GUID using hexadecimal digits.

What is GUID used for?

GUIDs are designed to be used nearly everywhere a unique identifier is needed. They can be used to uniquely identify COM entities on Windows, for example, and are also used to identify the following:

  • user accounts;
  • component identifiers that identify parts and components that are part of a final product, such as a car;
  • database keys to merge database records;
  • documents, such as Word documents and desktop files;
  • hardware, such as servers or monitors;
  • interfaces, such as operating systems; and
  • software applications.

Types and variants of GUIDs

There are five different versions of GUIDs, most of which follow the RFC 4122 specification.

  • Date-time and MAC address. This version generates IDs with the current time and client MAC
  • Distributed Computing Environment Security. This version is constructed similarly to the Date-time and MAC address GUID format but replaces the first 4 bytes of the timestamp with the user's Portable Operating System Interface UID. It was defined in the early 1990s and is rarely used. This version is also not defined in RFC4122.
  • Message-digest algorithm (MD5) hash and namespace. This version generates IDs using MD5 hash and a namespace converted into hexadecimal. GUIDs generated from the same namespace are identical in this format.
  • Randomly generated digits. Except for 6 bits that refer to version and variant bits, this version is generated using random bits. There is no specification on how the random digits should be generated, meaning that pseudo-random generators can be used.
  • Secure Hash Algorithm 1 (SHA-1) hash and namespace. This version is constructed similarly to MD5 hash and namespace, but uses SHA-1 for hashing instead of MD5.

Benefits of GUID

Some potential benefits that come with GUIDs include:

  • No central authority is needed, which means GUIDs can be generated internally for different uses.
  • The 128-bit size is large enough that it is extremely unlikely to get a repeating ID.
  • Merging databases with GUIDs is possible because it is extremely unlikely that two items share the same ID.
  • GUIDs can be generated rapidly and offline.

Learn how GUIDs are used in designing a custom Hyper-V Integration Service component in this article.

This was last updated in August 2021

Continue Reading About GUID (global unique identifier)

Dig Deeper on Windows Server storage management

SearchServerVirtualization
SearchCloudComputing
SearchSQLServer
SearchEnterpriseDesktop
SearchVirtualDesktop
Close