UUID Generator

Generate UUIDs (v4 random, v7 time-based, v5 namespace) in bulk, validate and parse existing IDs. Free, instant, no signup.

Use UUID Generator

Random

UUID versions explained (v1, v4, v7)

All UUIDs are 128-bit values, but the version digit (the first character of the third group) tells you how the bits were produced. v1 combines the current time with the host's MAC address — sortable, but it leaks hardware identity, which is why it fell out of favour. v4 is almost entirely random: 122 bits of entropy with six fixed bits for version and variant. It carries no meaning and no order, which makes it the safe default for public-facing IDs. v7 is the modern compromise standardised in RFC 9562: the first 48 bits hold a Unix millisecond timestamp, and the rest is random. You get the unpredictability of v4 with the natural time-ordering of v1, minus the MAC address. v5 (and v3) are different again — they are deterministic, derived by hashing a namespace and a name.

When to use v7 over v4

Reach for v7 whenever the identifier becomes a database primary key or a sort key. Random v4 keys scatter inserts across a B-tree or clustered index, fragmenting pages and hurting write throughput on large tables. Because v7 IDs increase roughly monotonically, new rows append near the end of the index, keeping inserts cheap and range scans on creation time fast — no separate created_at column needed for ordering. v7 also makes logs and event streams easier to eyeball, since you can read the timestamp straight out of the ID. Stick with v4 when you specifically do not want the creation time to be inferable from the identifier, for example in tokens or URLs where leaking timing would be a privacy concern.

Are UUIDs guaranteed unique?

Not guaranteed — but the odds of a collision are so small they are ignored in practice. A v4 UUID has 122 random bits. To reach a one-in-a-billion chance of any collision you would need to generate roughly 103 trillion of them. For everyday volumes the risk is effectively zero, which is why UUIDs let independent systems mint IDs without ever talking to a central server. The real-world caveats are about randomness quality and version mixing: a weak random source can reduce entropy, and deterministic v5 IDs are only "unique" per distinct namespace-plus-name input. For security tokens, don't rely on UUID uniqueness alone — use a cryptographically secure generator and treat the value as a secret.

Frequently Asked Questions

Find this useful?

These tools are free and ad-free. Support the project!

Buy me a coffee

Related Tools