Online UUID (GUID) Generator

Your Version 4 UUID:

Regenerate Version 4 UUID

 Advanced Settings

Advanced Settings

UUID Version:
UUID Quantity:
UUID Formatting:
Additional Parameters:
Physical MAC Address (Hex):
Namespace:
Custom Namespace:
Name:

 Output

Webtools - Online UUID (GUID) Generator

Webtools - Online UUID (GUID) Generator is a free online tool that helps you generate different versions of UUIDs for software components, database key, or just for anything where unique identifiers are required.

What is UUID (or GUID)

UUID (or GUID) is an acronym for 'Universally Unique Identifier' (or 'Globally Unique Identifier'). UUIDs are 128-bit number used to uniquely identify resources in software programs. When generated according to the standard methods, UUIDs are unique for practical purposes. UUIDs are originally used in the Apollo Network Computing System and later in the Open Software Foundations' (OSF) Distributed Computing Environment (DCE), and then in Microsoft Windows platforms.

For human readability, UUIDs are represented as 32 hexadecimal (base 16) string, displayed in five groups separated by hyphens, in the form 8-4-4-4-12. The hexadecimal values "a" through "f" are output as lower case characters and are case insensitive on input.

For example:

145e4127-e89b-42e3-a456-112255446600

In memory, UUIDs are saved as 16 octets continuous memory slots in Most Significant Byte first order (also known as network byte order). Each octet of the UUIDs is interpreted as 8-bit unsigned integer. UUIDs are of multiple types based on algorithm used for their generation. Bits sequence in each UUID type are interpreted differently. The layout of UUIDs are determine by the variant field bits. Variant field bits dictates how all other bits in UUIDs be interpreted. Variant bits are the most significant 3 bits of octet 8 of UUIDs.

The following table lists the contents of the variant field bits, where the letter "x" indicates a "don't-care" value.

Msb0Msb1Msb2VariantDescription
0xx0Reserved, NCS backward compatibility
10x2Leach-Salz, Webtools.Services UUID generator creates only this type of UUID
1106Reserved, Microsoft Corporation backward compatibility
1117Reserved for future

The type of UUID is determine by the version field bits. The version field bits are the most significant 4 bits of octet 6 of UUIDs.

The following table lists the currently-defined versions for variant 2 UUID also known as RFC 4122/DCE 1.1 UUIDs, or "Leach-Salz" UUIDs, after the authors of the original Internet Draft

Msb0Msb1Msb2Msb3VersionDescription
00011Time-based version
00102DCE Security version, with embedded POSIX UIDs
00113MD5 hashed name-based version
01004Randomly or pseudo-randomly generated version
01015SHA1 hashed name-based version

Taking previous UUID example

145e4127-e89b-42e3-a456-112255446600

xxxxxxxx-xxxx-Zxxx-Vxxx-xxxxxxxxxxxx

"V" represents the variant field. V's value in the example UUID is 'a'. The binary equivalent of 'a' is "10xx" making variant as 2.

"Z" represents the version. Z's value in the example UUID is 4 making it a Random UUID type.

Different types of UUIDs

RFC 4122 proposes different algorithms to generate UUIDs with different level of uniqueness. If you need unique Ids, use Time-based UUIDs or Random UUIDs. If you need Ids which are namespace scoped, use either MD5 hash Name-based UUIDs or SHA1 hash Name-based UUIDs

Time-based UUIDs aka Version 1 UUIDs are generated using high precision timer and 802 MAC addresses. For security reasons, it's not recommended to use Time-based UUIDs because they can be traced back to the machines which generated them.

MD5 hash Name-based UUIDs aka Version 3 UUIDs are generated from MD5 hash of provided namespace and name. MD5 hash Name-based UUIDs are backward compatible with other systems that generates UUIDs from names.

Random UUIDs aka Version 4 UUIDs are generated from random (or pseudo-random) numbers. Random UUIDs are most widely used UUIDs.

SHA1 hash Name-based UUIDs aka Version 5 UUIDs are generated from SHA1 hash of provided namespace and name.

Time-based UUIDs aka Version 1 UUIDs

Time-based UUIDs are composed of 5 data elements which are 60 bit timestamp, a 14 bit clock sequence, a 4 bits node Id aka 802 MAC address, version and variant field bits.

Format of Time-based UUID is:

time-low "-" time-mid "-" version-and-time-high "-" variant-and-clock-sequence "-" node Id

where:

  • time-low= 4 hexOctet
  • time-mid= 2 hexOctet
  • version-and-time-high= 2 hexOctet
  • variant-clock-sequence= 2 hexOctet
  • node Id= 6 hexOctet

Timestamp is a 60 bits value of the UTC time from a high precision clock. Timestamp represents count of 100 nanosecond intervals since 00:00:00:00.00, 15 October 1582. If no UTC time can be obtained, the local time can be used. When more than 1 UUID is needed per 100 nanoseconds multiple node Ids will be required.

Clock Sequence is a 14 bits value used to avoid duplicates that could arise when the clock is set backwards in time after a clock skew error or clock re-synchronization after a system reboot. During startup the clock sequence must initialized to a random number to minimize the correlation across systems. If the previous value of the clock sequence is known, it can just be incremented; otherwise it should be set to a random or high-quality pseudo-random value.

Node Id is a 48 bits IEEE 802 MAC address, usually the host address. If node Id is not known, pseudo-random generator can be used to generate 48 bits node value. When random value is used as node Id the multicast bit (least significant bit of the first byte) must be set to 1, this to avoid clashes with legitimate IEEE 802 addresses.

Example of Time-based UUID

ebbfcf93-ba69-11e9-90e4-e12233a2f345

The timestamp is 1e9ba69ebbfcf93. The 1 before the most significant digits of the timestamp in UUID (i.e., 1e9) indicates the UUID version. Variant field and clock sequence are represented by "90e4". The node Id used to generate the example UUID was E1:22:33:A2:F3:45 which is represented by "e12233a2f345" in UUID.

Name-based UUIDs

Name-based UUIDs are generated by hashing together a namespace identifier with a name. Version 3 use MD5 message-digest algorithm whereas Version 5 use SHA1 message-digest algorithm as the hashing algorithms.

Both Version 3 UUIDs & Version 5 UUIDs adheres to below requirements:

  1. The UUIDs generated at different times from the same name in the same namespace MUST be equal.
  2. The UUIDs generated from two different names in the same namespace should be different (with very high probability).
  3. The UUIDs generated from the same name in two different namespaces should be different (with very high probability).
  4. If two UUIDs that were generated from names are equal, then they were generated from the same name in the same namespace (with very high probability).

Namespaces can be the domain name, URLs, ISO Object IDs (OIDs), X.500 Distinguished Names (DNs), and reserved words in a programming language. For every namespace a UUID must be defined. For certain namespaces predefined UUIDs have been defined in the Leach, Mealling and Salz original Internet Draft.

Following are some predefined namespaces you can use for UUID generation:

  1. NameSpace_DNS: {6ba7b810-9dad-11d1-80b4-00c04fd430c8}
  2. NameSpace_URL: {6ba7b811-9dad-11d1-80b4-00c04fd430c8}
  3. NameSpace_OID: {6ba7b812-9dad-11d1-80b4-00c04fd430c8}
  4. NameSpace_X500:{6ba7b814-9dad-11d1-80b4-00c04fd430c8}

To generate name-based UUID, first convert namespace UUID into a byte array after removing the hyphens and creating bytes from each hexadecimal number. Then convert name into byte array as defined by the standard or conventions of the namespace. Concatenate namespace and name byte arrays and calculate either MD5 hash for generating Version 3 UUID or SHA1 hash for generating Version 5 UUID. Take the first 16 bytes of the hash, update the version and variant bits. Convert the byte array into 32 digit hexdecimal string to get the string representation of the UUID.

Example of Name-based (Version 3) UUID

fc17f70d-2eec-3017-b9f9-fcc755d80899

Random UUIDs aka Version 4 UUIDs

Random UUIDs aka Version 4 UUIDs are 16 bytes string where each byte has random value except for the version and variant bits.

Random UUIDs are most easy to generate. To generate Random UUID take 16 bytes array. Initialize each byte with random unsigned-integer value. Then set the version and variant field bits. Convert the byte array into string of 32 hexadecimal characters.

Example of Random UUID

cb73828b-3b85-4ae8-a875-c67d1bb7ac06

NIL UUIDs

The Nil UUID is special form of UUID in which all 128 bits are set to zero.

Example of Nil UUID

00000000-0000-0000-0000-000000000000

Generate UUID using Webtools - Online UUID (GUID) Generator

Webtools - Online UUID (GUID) generator helps you generate different versions of UUIDs.

Generate Time-based UUID

  1. Select "V1 (Time-based) UUID" option from "UUID Version" dropdown.
  2. Select quantity from "UUID Quantity" dropdown.
  3. Select "UUID formatting" options.
  4. To generate UUID using MAC address, uncheck "Use pseudo MAC Address" checkbox. Enter MAC address in the "Physical MAC Address" textbox.
  5. Click "Generate" button to generate time-based UUID.

Generate Name-based UUID

  1. Select either "V3 (Name-based | MD5 hash) UUID" or "V5 (Name-based | SHA1 hash) UUID" option from "UUID Version" dropdown.
  2. Select quantity from "UUID Quantity" dropdown.
  3. Select "UUID formatting" options.
  4. Select either predefined namespace from "Namespace" dropdown. Or select "Custom" option from "Namespace" dropdown to enter your custom namespace UUID in "Custom Namespace" textbox.
  5. Enter name in the "name" textbox.
  6. Click "Generate" button to generate time-based UUID.

Generate Random UUID

  1. Select "V4 (Random) UUID" option from "UUID Version" dropdown.
  2. Select quantity from "UUID Quantity" dropdown.
  3. Select "UUID formatting" options.
  4. Click "Generate" button to generate time-based UUID.

Generate Nil UUID

  1. Select "Nil UUID" option from "UUID Version" dropdown.
  2. Select quantity from "UUID Quantity" dropdown.
  3. Select "UUID formatting" options.
  4. Click "Generate" button to generate time-based UUID.

External Links

More information about UUID (Wikipedia)

More information about RFC 4122

Found an issue, or have feedback?

Help us make "UUID (GUID) Generator" tool better by submitting an issue or a feedback today.

The UUIDs generated by this site are provided AS IS without warranty of any kind, not even the warranty that the generated UUIDs are actually unique. You are responsible for using the UUIDs and assume any risk inherent to using them. You are not permitted to use the UUIDs generated by this site if you do not agree to these terms. Do not use any UUIDs found on cached versions of this page.