UUID Generator
Generate one or many UUIDs — v4 (fully random), v7 (timestamp
plus random, sorts by creation time), or v1 (timestamp-based). All
generated locally with crypto.getRandomValues(), and
nothing is sent anywhere.
Which version should I use?
| v4 — Random | The default choice. Fully random, no information leaked about when or where it was created. |
| v7 — Timestamp-sortable | Increasingly the recommended choice for database primary keys — random like v4, but sorts in creation order, which keeps database indexes efficient. |
| v1 — Timestamp-based | The original "time-based" UUID from 1996. Mostly of historical/legacy interest today — v7 does the same job better for new systems. |
Frequently asked questions
Is there any real risk of generating a duplicate?
For v4 and v7, no in any practical sense — there are 2122 possible random v4 UUIDs. You'd need to generate roughly a billion UUIDs every second for about 85 years before there's a 50% chance of a single collision anywhere. v1 is similarly safe in practice, since its timestamp plus a random node ID makes a collision from two independent generators effectively impossible.
Doesn't v1 need my MAC address?
Traditionally, yes — the original spec used your network card's MAC address as the "node" field so IDs from different machines wouldn't collide. That's also a real privacy leak (it can identify the exact machine that generated an ID), so this generator does what the RFC explicitly allows instead: a random node value with a bit set that marks it as "not a real MAC address," which is what most modern v1 implementations do.
Why does v7 sorting matter for databases?
Databases store rows in index order, and a purely random ID (like v4) means every insert lands in a random spot in that index, which gets expensive at scale. A v7 ID's timestamp prefix means new rows are always inserted near the end, close to how auto-incrementing integer IDs behave, while still keeping the rest of the ID random and unguessable.
What's the difference between a UUID and a GUID?
Nothing, functionally — GUID is Microsoft's name for the same
128-bit identifier format standardized as UUID. The formats are
interchangeable; "Braces" formatting here ({xxxxxxxx-...})
matches the style Microsoft tooling typically expects.