UUID Generator
Generate Version 1 (time-based), Version 4 (random), or Version 5 (name-based) UUIDs. Generate in bulk, copy individually or all at once. All generation happens client-side using the Web Crypto API.
What is a UUID?
A UUID (Universally Unique Identifier) is a 128-bit value used to uniquely identify information in computer systems. UUIDs are standardised in RFC 4122 and are designed to be globally unique without requiring a central registration authority.
A UUID looks like this: 550e8400-e29b-41d4-a716-446655440000: 32
hexadecimal digits displayed in five groups separated by hyphens, in the form
8-4-4-4-12.
UUID versions explained
Version 1: Time-based
V1 UUIDs are generated from the current timestamp (in 100-nanosecond intervals since 15 October 1582), a clock sequence, and a node identifier (typically the MAC address of the generating machine, though this tool uses a random node to preserve privacy).
V1 UUIDs are sortable by time and guaranteed unique per machine. The downside is that they can leak information about when and where they were generated. Use V1 when you need time-ordering or when generating UUIDs on distributed systems without coordination.
Version 4: Random
V4 UUIDs are generated entirely from random or pseudo-random numbers. 122 of the 128 bits are randomly generated (6 bits are fixed for version and variant). This is the most commonly used version: simple, fast, and doesn't leak any information.
This tool uses crypto.randomUUID() when available (backed by the
operating system's cryptographic random number generator), falling back to
crypto.getRandomValues() for maximum randomness.
Version 5: Name-based (SHA-1)
V5 UUIDs are generated by hashing a namespace UUID and a name using SHA-1, then taking the first 128 bits. The same namespace + name always produces the same UUID, making V5 deterministic and reproducible.
Common namespaces include DNS, URL, OID, and X.500. Use V5 when you need consistent UUIDs derived from known inputs. For example, generating a user ID from an email address, or a resource ID from a URL.
UUID vs GUID
UUID and GUID (Globally Unique Identifier) are functionally identical. "GUID" is Microsoft's terminology, used throughout Windows, .NET, COM, and Active Directory. "UUID" is the industry-standard term from RFC 4122 and is used in most other contexts (databases, APIs, Linux, etc.). The format and generation algorithms are the same.
One minor difference: Microsoft tools sometimes display GUIDs with curly braces
({550e8400-e29b-41d4-a716-446655440000}) while UUIDs are typically
shown without them.
Collision probability
For V4 UUIDs with 122 random bits, the probability of generating a duplicate is astronomically small. You would need to generate approximately 2.71 × 1018 UUIDs (2.71 quintillion) to have a 50% chance of a single collision. At a rate of one billion UUIDs per second, this would take about 86 years.
In practical terms: if every person on Earth generated a UUID every second for 100 years, the probability of any collision would be about 50%. For any real-world application, V4 UUID collisions are not a concern worth designing around.
When to use each version
- V4 (default recommendation)
- Database primary keys, API identifiers, session tokens, correlation IDs, any case where you just need a unique value. The simplest and most widely supported.
- V1
- When time-ordering matters: log entries, event streams, distributed systems where you need to sort by creation time. Note: consider ULIDs or UUID v7 (draft) as modern alternatives for time-sorted IDs.
- V5
- When the same input must always produce the same UUID: URL-based resource IDs, deterministic test fixtures, content-addressable identifiers. V5 (SHA-1) is preferred over V3 (MD5) for new applications.