UUID Generator — Cryptographically Random v4 UUIDs
Fresh, collision-safe identifiers for your code, tests and documents — generated on your device with the browser crypto API.
UUID Generator
Cryptographically random v4, straight from your browser
How to generate UUIDs (3 steps)
- Set the count — one for a single row or document, up to 500 for seeding a test fixture or a migration script.
- Choose the shape — lowercase is the conventional default; uppercase appears in some database and document systems; the dash toggle removes the hyphens when your target format stores 32 raw hex characters.
- Generate and copy. Every batch is produced fresh with
crypto.randomUUID()— the same Web Crypto primitive that browsers expose to secure contexts — and copied as plain text.
What a v4 UUID actually is
A version-4 UUID is 128 bits of randomness arranged into the familiar 8-4-4-4-12 hex groups. The version nibble (the single 4 in the third group) and the variant bits (the leading digit of the last group being 8, 9, a or b) are fixed; the other 122 bits are random. That gives 2¹²² possible values — roughly 5.3 × 10³⁶ — so two independently generated v4 UUIDs colliding is not a planning concern: the probability is far below the chance that your storage system corrupts a byte first. The format exists precisely so that a client, a test, or a mobile device can mint a unique id with no server round-trip and no coordination.
Typical jobs this saves
- Test fixtures — a batch of stable ids for a seed file, without hand-typing hex.
- Document and row keys — primary keys that stay unique across merged databases, because they were never drawn from a shared sequence.
- Anonymous, unguessable references — a share token or an internal reference code that must not be enumerable (v4's randomness is what makes it unguessable; a counter would not be).
What this generator is not
It is not a replacement for v7 (time-ordered) UUIDs when you specifically need sortable ids, and it is not a key-derivation tool — a UUID is an identifier, not a secret; anyone who sees it can quote it. And of course nothing you generate is sent anywhere: the randomness comes from your own browser, and the values live in your clipboard the moment you copy them.