Online UUID Generator
Your Random UUID :
Refresh page to regenerate another Version 4 UUID
Advanced Settings
Advanced Settings
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:
Msb0 | Msb1 | Msb2 | Variant | Description |
---|---|---|---|---|
0 | x | x | 0 | Reserved, NCS backward compatibility |
1 | 0 | x | 2 | Leach-Salz, Webtools.Services UUID generator creates only this type of UUID |
1 | 1 | 0 | 6 | Reserved, Microsoft Corporation backward compatibility |
1 | 1 | 1 | 7 | Reserved 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:
Msb0 | Msb1 | Msb2 | Msb3 | Version | Description |
---|---|---|---|---|---|
0 | 0 | 0 | 1 | 1 | Time-based version |
0 | 0 | 1 | 0 | 2 | DCE Security version, with embedded POSIX UIDs |
0 | 0 | 1 | 1 | 3 | MD5 hashed name-based version |
0 | 1 | 0 | 0 | 4 | Randomly or pseudo-randomly generated version |
0 | 1 | 0 | 1 | 5 | SHA1 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.
- The UUIDs generated at different times from the same name in the same namespace MUST be equal.
- The UUID generated from two different names in the same namespace should be different (with very high probability).
- The UUIDs generated from the same name in two different namespaces should be different (with very high probability).
- 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:
- NameSpace_DNS: {6ba7b810-9dad-11d1-80b4-00c04fd430c8}
- NameSpace_URL: {6ba7b811-9dad-11d1-80b4-00c04fd430c8}
- NameSpace_OID: {6ba7b812-9dad-11d1-80b4-00c04fd430c8}
- 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
- Choose "V1 (Time-based) UUID" from the "UUID Version" dropdown.
- Select the desired quantity from the "UUID Quantity" dropdown.
- Opt for your preferred "UUID formatting" options.
- 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.
- Click the "Generate" button to create time-based UUIDs.
Create Name-Based UUID
- Pick either "V3 (Name-based | MD5 hash) UUID" or "V5 (Name-based | SHA1 hash) UUID" from the "UUID Version" dropdown.
- Select the quantity you need from the "UUID Quantity" dropdown.
- Choose your preferred "UUID formatting" options.
- 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.
- Enter the desired name in the "Name" textbox.
- Click the "Generate" button to generate name-based UUIDs.
Create Random UUID
- Simply select "V4 (Random) UUID" from the "UUID Version" dropdown.
- Specify the quantity you want from the "UUID Quantity" dropdown.
- Customize your "UUID formatting" options as needed.
- Click the "Generate" button to create random UUIDs.
Create Nil UUID
- Opt for the "Nil UUID" option in the "UUID Version" dropdown.
- Indicate the desired quantity via the "UUID Quantity" dropdown.
- Adjust your "UUID formatting" options as per your preference.
- 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
Link This Tool
You can link this tool by copying and pasting below HTML code in your page:
<a href="https://www.webtools.services/uuid-generator">Online UUID (GUID) Generator Tool</a>
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.