Online UUID Generator

Your Random UUID :

Refresh page to regenerate another Version 4 UUID

 Advanced Settings

Advanced Settings

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

 Output

Webtools - UUID Generator | GUID Generator

Welcome to our Online UUID / GUID Generator tool, your trusted solution for effortlessly creating a wide array of universally unique identifiers (UUIDs) and globally unique identifiers (GUIDs) right from your browser. Whether you're a seasoned developer, a dedicated system administrator, or simply in need of unique identifiers for your projects, our tool is here to cater to your needs. Our user-friendly tool streamlines the process of generating Universally Unique Identifiers (UUIDs) and Globally Unique Identifiers (GUIDs) to precisely match your requirements.

What is UUID or GUID?

UUID, which stands for Universally Unique Identifier, and GUID, or Globally Unique Identifier, both consist of 128-bit numbers with the shared goal of guaranteeing the uniqueness of identifiers across various systems and timeframes. While these terms are often used interchangeably, UUIDs are more commonly associated with the Linux and open-source community, whereas GUIDs are frequently employed in Microsoft Windows environments.

For human readability, both UUIDs and GUIDs are represented as 32 character hexadecimal (base 16) strings, displayed in five groups separated by hyphens, in the format 8-4-4-4-12. Hexadecimal values 'a' through 'f' are displayed in lowercase and are case-insensitive in input.

For instance:

145e4127-e89b-42e3-a456-112255446600

In memory, both UUIDs and GUIDs are stored as 16 octets in contiguous memory slots, using the Most Significant Byte first order (also known as network byte order). Each octet in a UUID or GUID is interpreted as an 8-bit unsigned integer.

UUIDs and GUIDs come in various types, determined by the algorithm used for their generation. The bit sequence in each type is interpreted differently. The layout of UUIDs and GUIDs is determined by the variant field bits. The variant field bits dictate how all other bits in UUIDs or GUIDs should be interpreted. The variant bits occupy the three most significant bits of octet 8 in a UUID or GUID.

The following table summarizes the contents of the variant field bits, where '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 determined by the version field bits. The version field bits occupy the four most significant bits of octet 6 in UUIDs.

The following table lists the currently-defined versions for variant 2 UUIDs, also known as RFC 4122/DCE 1.1 UUIDs, or 'Leach-Salz' UUIDs, named 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

Referring to the previous UUID example:

145e4127-e89b-42e3-a456-112255446600

xxxxxxxx-xxxx-Zxxx-Vxxx-xxxxxxxxxxxx

"V" represents the variant field. In the example UUID, 'V' has a value of 'a.' The binary equivalent of 'a' is "10xx," indicating a variant of 2.

"Z" represents the version. In the example UUID, 'Z' has a value of 4, designating it as a Random UUID type.

Understanding UUID Types

RFC 4122 introduces various algorithms for generating UUIDs, each offering different levels of uniqueness. When selecting a UUID type, it's essential to consider your specific requirements:

Time-Based UUID (Version 1 UUID):

  • Generated using high-precision timers and 802 MAC addresses.
  • Not suitable for security-critical applications as it can be traced back to the generating machine.

Random UUID (Version 4 UUID):

  • Generated from random or pseudo-random numbers.
  • Widely used for its unpredictability and versatility across applications.

MD5 Hash Name-Based UUID (Version 3 UUID):

  • Created from the MD5 hash of a given namespace and name.
  • Compatible with systems that generate UUIDs from names.

SHA1 Hash Name-Based UUID (Version 5 UUID):

  • Generated from the SHA1 hash of a provided namespace and name.

For unique identifiers, consider Time-Based or Random UUIDs. If you need IDs scoped within a namespace, explore MD5 or SHA1 Hash Name-Based UUIDs.

Time-Based UUID (Version 1 UUID)

Time-based UUIDs consist of five data elements: a 60-bit timestamp, a 14-bit clock sequence, a 4-bit node ID (802 MAC address), version and variant field bits.

The format of a Time-Based UUID is as follows:

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

The timestamp represents a 60-bit value of UTC time from a high-precision clock, counting 100 nanosecond intervals since 00:00:00:00.00, 15 October 1582. If no UTC time is available, local time can be used. When generating more than one UUID within 100 nanoseconds, multiple node IDs are required.

Clock Sequence is a 14-bit value used to avoid duplicates caused by backward clock adjustments or clock re-synchronization after system reboots.During startup the clock sequence must initialized to a random number to minimize the correlation between 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.

The node ID is a 48-bit IEEE 802 MAC address, usually the host's address. If the node ID is unknown, a random 48 bits node value can be used. When a random value is used as the node ID, the multicast bit (least significant bit of the first byte) must be set to 1 to avoid conflicts with legitimate IEEE 802 addresses.

Example of Time-Based UUID:

ebbfcf93-ba69-11e9-90e4-e12233a2f345

The timestamp here is 1e9ba69ebbfcf93, with '1' before the most significant digits of the timestamp in UUID (i.e., 1e9) indicates the UUID version, '90e4' representing the variant field and clock sequence, and the node ID 'e12233a2f345'.

Name-Based UUID (Version 3 UUID and Version 5 UUID)

Name-based UUIDs are generated by hashing a namespace identifier with a name. Version 3 uses the MD5 message-digest algorithm while Version 5 uses the SHA1 message-digest algorithm.

Both Version 3 and Version 5 UUIDs adhere to below requirements, ensuring their uniqueness based on namespaces and names.

  1. The UUIDs generated at different times from the same name in the same namespace MUST be equal.
  2. The UUID 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 include domain names, URLs, ISO Object IDs (OIDs), X.500 Distinguished Names (DNs), and reserved words in a programming language. Each namespace must define a UUID. Some predefined namespaces UUIDs are defined in the Leach, Mealling and Salz original Internet Draft.

List of predefined namespaces 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 a name-based UUID, begin by converting the namespace UUID into a byte array, removing hyphens and transforming hexadecimal numbers into bytes. Then, convert the provided name into a byte array, adhering to the namespace's standard or conventions. Combine these byte arrays by concatenation and employ either the MD5 hash for Version 3 UUID or the SHA1 hash for Version 5 UUID generation. Extract the initial 16 bytes from the resulting hash, adjusting the version and variant bits as necessary, and convert the byte array into a 32-digit hexadecimal string, yielding the UUID's string representation.

Example of Name-based (Version 3) UUID

fc17f70d-2eec-3017-b9f9-fcc755d80899

Random UUID (Version 4 UUID)

Random UUIDs, also known as Version 4 UUIDs, consist of 16 bytes, with each byte having a random value except for the version and variant bits. Generating Random UUIDs is straightforward, involving the initialization of a 16-byte array with random unsigned-integer values and the setting of version and variant field bits.

Example of Random UUID

cb73828b-3b85-4ae8-a875-c67d1bb7ac06

NIL UUID

The Nil UUID is a special form where all 128 bits are set to zero.

Example of Nil UUID

00000000-0000-0000-0000-000000000000

UUID Usage

UUIDs find applications in a wide range of fields, including:

  • Database Records: UUIDs serve as primary keys to ensure unique identification of database records across distributed systems.
  • Distributed Systems: UUIDs are vital in distributed computing to prevent conflicts when multiple nodes generate identifiers.
  • Security: They are used in security protocols to create secure tokens and access keys.
  • Cryptographic Applications: UUIDs play a role in generating cryptographic keys and nonces.
  • Web Development: UUIDs can be used to create unique session identifiers and tracking tokens.
  • IoT (Internet of Things): UUIDs help uniquely identify IoT devices in large-scale deployments.
  • Document Versioning: In document management systems, UUIDs are used to track versions of documents.

Create UUID using Webtools - UUID Generator | GUID Generator

Ready to generate UUIDs for your specific needs? Our UUID Generator tool is here to assist you.

Create Time-Based UUID

  1. Choose "V1 (Time-based) UUID" from the "UUID Version" dropdown.
  2. Select the desired quantity from the "UUID Quantity" dropdown.
  3. Opt for your preferred "UUID formatting" options.
  4. To create a UUID using a MAC address, uncheck the "Use pseudo MAC Address" checkbox and input the MAC address in the "Physical MAC Address" textbox.
  5. Click the "Generate" button to create time-based UUIDs.

Create Name-Based UUID

  1. Pick either "V3 (Name-based | MD5 hash) UUID" or "V5 (Name-based | SHA1 hash) UUID" from the "UUID Version" dropdown.
  2. Select the quantity you need from the "UUID Quantity" dropdown.
  3. Choose your preferred "UUID formatting" options.
  4. To create a name-based UUID, you can either select a predefined namespace from the "Namespace" dropdown or go for the "Custom" option, allowing you to enter your custom namespace UUID in the "Custom Namespace" textbox.
  5. Enter the desired name in the "Name" textbox.
  6. Click the "Generate" button to generate name-based UUIDs.

Create Random UUID

  1. Simply select "V4 (Random) UUID" from the "UUID Version" dropdown.
  2. Specify the quantity you want from the "UUID Quantity" dropdown.
  3. Customize your "UUID formatting" options as needed.
  4. Click the "Generate" button to create random UUIDs.

Create Nil UUID

  1. Opt for the "Nil UUID" option in the "UUID Version" dropdown.
  2. Indicate the desired quantity via the "UUID Quantity" dropdown.
  3. Adjust your "UUID formatting" options as per your preference.
  4. Click the "Generate" button to generate nil UUIDs.

Our user-friendly tool makes UUID generation a breeze. Explore the various options and create UUIDs that suit your unique needs.

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.