UUID generator (v4)
Cryptographically random UUID v4 strings.
A UUID Generator produces a uuid on demand, using a deterministic algorithm or a cryptographically strong random source. Output is generated entirely in your browser so nothing is sent to a server. Bulk generation. The tool runs entirely in your.
Cryptographically random UUID v4 strings.
Generate v4 / v7 UUIDs. Bulk export.
UUIDs (Universally Unique Identifiers): 128-bit random IDs. v4 is random; v7 is time-sortable (recommended for databases since 2024). Probability of collision: 1 in 2^122 - practically impossible.
A UUID (Universally Unique Identifier) is a 128-bit value that any system can generate independently with effectively zero risk of colliding with one generated elsewhere. UUIDs sit at the core of distributed systems: database primary keys, request correlation IDs, session tokens, file handles, RPC trace IDs, and message IDs in event queues. The original spec is RFC 4122 (2005); the modern revision is RFC 9562 (2024) which formalises versions 6, 7, and 8.
Microsoft brands the same construct as GUID (Globally Unique Identifier). The format and algorithms are identical; only the spelling differs in legacy Windows APIs. This generator emits both v4 (random) and v7 (timestamp plus random), the two versions that account for more than 95 percent of new application traffic.
A UUID (Universally Unique Identifier, also called GUID by Microsoft) is a 128-bit number formatted as 36 characters: xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx. The M digit indicates the version, the N digit indicates the variant. The collision probability for v4 is negligible - generating 1 billion per second for 85 years has about a 50% chance of one collision.
| Version | Generated from | Sortable? | Best for |
|---|---|---|---|
| v1 | Timestamp + MAC address | Mostly | Legacy. Leaks the host MAC and creation time. |
| v3 | MD5 hash of a namespace + name | No | Deterministic IDs from inputs. |
| v4 | 128 random bits (122 effective) | No | Default choice. Best for most applications. |
| v5 | SHA-1 hash of a namespace + name | No | Same as v3 but better hash. |
| v6 | Reordered v1 (timestamp first) | Yes | Sortable by creation time. Replaces v1. |
| v7 | Unix epoch ms + random | Yes (lexically) | DB primary keys. Replaces v4 + ULID. |
UUID v4 is great for uniqueness but terrible for database performance. Random PKs cause B-tree page splits on every insert, which can slow large tables 2-10x compared to sequential IDs.
UUID v7 (RFC 9562, finalized 2024) prefixes the random portion with a Unix-milliseconds timestamp. This means new v7 UUIDs sort to the end of the index, restoring sequential-insert performance while keeping the universal-uniqueness guarantee.
For v4 (122 random bits), the birthday-paradox 50% collision threshold is about 2.71 quintillion (2.71 x 10^18) UUIDs. To put that in perspective: generating one million UUIDs per second per device, on every smartphone on Earth, for 13 billion years, has roughly a 1 in 1,000 chance of a single collision.
A typical v7 UUID looks like 018eed29-2c8d-7c4f-9e63-7a2d33b0e6e1. Break it apart:
018eed29 2c8d is the Unix milliseconds timestamp. That value decodes to 2024-04-19 around 14:00 UTC.7 is the version marker (v7).c4f is the first slice of randomness (rand_a, 12 bits).10 binary (encoded in the leading bits of 9) is the variant marker (RFC 4122 family).e63-7a2d33b0e6e1 is rand_b, the bulk of the randomness.v7 for database primary keys: it sorts by creation time, plays well with B-tree indexes, and matches the role ULID played before v7 was standardised. v4 for everything else: session tokens, idempotency keys, request IDs, file names. Both have effectively zero collision risk.
Not in theory, but the math is reassuring. For v4 (122 random bits) the 50 percent collision threshold sits at about 2.7 quintillion UUIDs. Generating a million per second on every smartphone alive for 13 billion years gives a 1-in-1000 chance of one duplicate.
None at the bits level. GUID is Microsoft's branding from Windows COM and .NET; UUID is the IETF spelling. Both follow RFC 4122 and the 2024 RFC 9562. Tools that emit one will be accepted by tools that expect the other.
As a session ID yes; v4 contains 122 random bits, comparable to a 20-character ASCII token. As a password no, because UUIDs are not hashed by the client and the dash-separated format leaks structure to log scrubbers. Wrap the UUID in an HMAC or signed cookie for any auth use.
Use the regex ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-7][0-9a-fA-F]{3}-[89ab][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$. Positions 14 (version 1 to 7) and 19 (variant 8/9/a/b) carry the protocol metadata. Anything that matches is well-formed; whether it was generated by a trusted source is a separate question.