UUID Generator

Random version-4 UUIDs, generated in your browser.

RFC 4122 version 4, properly formatted

Generates standard version-4 UUIDs — 128-bit identifiers with the version and variant bits set correctly per the RFC 4122 spec — the same format used across databases, APIs, and distributed systems where you need an identifier that's practically guaranteed not to collide with any other, generated anywhere, without coordinating with a central authority.

How unlikely is a collision, really

With 122 random bits (the other 6 are fixed by the version/variant spec), there are roughly 2^122 possible v4 UUIDs — around 5.3 undecillion. You'd need to generate about a billion UUIDs every second for around 85 years before the odds of any two colliding reached 50%. For anything short of that scale, treating a v4 UUID as unique is a safe assumption in practice, which is exactly why it's the default choice for primary keys, request IDs, and idempotency tokens across most modern systems.

Why version 4 specifically

UUIDs come in several versions with different generation methods — version 1 encodes a timestamp and the generating machine's network address, version 3 and 5 derive a UUID deterministically from a name and a fixed namespace, and version 4 is pure randomness with no embedded metadata at all. That last property is exactly why v4 is the common default: a v1 UUID can leak when and where it was generated, while a v4 UUID reveals nothing about its origin beyond the fact that it's a UUID — a meaningful privacy and security advantage when the identifier might end up visible to an end user.

Generated with real cryptographic randomness

This generator sources its randomness from the Web Crypto API rather than JavaScript's ordinary Math.random, which is what the RFC 4122 spec actually recommends for producing UUIDs that are safe to treat as unpredictable, not just statistically unlikely to repeat. That distinction matters more for something like a session token than for a throwaway test ID, but building it correctly by default means the same output is safe to use in both cases without having to think about which generator method was used.