UUID Generator

Generate UUIDs of any version — random v4, sortable v7, or deterministic v3/v5.

Version

Random. The general-purpose default.

Output

Result

Your UUID will appear here.

About this UUID generator

Generates UUIDs for every version in practical use, entirely in your browser. Randomness comes from the Web Crypto API's getRandomValues, not Math.random, so the output is cryptographically random rather than merely unpredictable-looking. Nothing is sent to a server, which matters if you are generating identifiers that will end up in production data.

Which version should I use?

v4 is still the right default. It is 122 bits of randomness with no embedded meaning, it is what every language's standard library gives you, and collisions are not a practical concern.

v7 is the better choice for database primary keys. It puts a Unix millisecond timestamp in the leading bits, so UUIDs sort by creation time. That keeps B-tree index inserts sequential instead of scattering them across the index, which is the usual reason random UUID keys hurt write performance. Use v7 unless you specifically need the identifier to reveal nothing about when it was made.

v5 is for deterministic identifiers: the same namespace and name always produce the same UUID, so you can derive a stable ID from something you already have without storing a mapping. v3 is the same idea using MD5, and exists for compatibility — prefer v5 for new work.

v1 and v6 encode a timestamp and a node ID. v1 sorts badly because its timestamp is stored least-significant-part-first; v6 fixes exactly that. Both are largely superseded by v7. v8 is a blank cheque: RFC 9562 fixes only the version and variant bits and lets you define the other 122.

Why is there no v2?

UUID v2 ("DCE Security") was defined in a separate DCE 1.1 specification rather than the UUID RFCs, is barely used, and is not implemented by most standard libraries. RFC 9562 acknowledges it but does not define its generation. Including it would mean inventing behaviour, so this tool omits it.

About the node ID in v1 and v6

Those versions traditionally embed the machine's MAC address. A browser cannot read one, so this generator uses a random node ID with the multicast bit set — the method RFC 9562 prescribes for exactly this case. It marks the value as not a real hardware address, and has the pleasant side effect of not leaking your network card into every ID.

Are these safe to use as secrets?

v4 and v7 draw from a cryptographically secure random source, so a v4 UUID is reasonable as an unguessable token. v1, v3, v5 and v6 are not — v1 and v6 are largely predictable from the time, and v3/v5 are a hash of inputs someone may be able to guess. Never use a name-based UUID where you need unguessability.