Generators
UUID Generator — Proper v4 UUIDs
Generate version-4 UUIDs with your browser's cryptographic random generator (crypto.randomUUID) — the real thing, not a Math.random imitation. One for a quick key, or a batch for seeding test data.
Last updated: November 2026 · Runs 100% in your browser — files never leave your device.
Why v4, why crypto-grade
A v4 UUID carries 122 bits of randomness. Generated with a cryptographic source, collisions are not a practical concern at any scale a human project reaches — you would need to generate billions before collision odds become interesting. Generated with a weak source, the same format can repeat embarrassingly. This tool uses crypto.randomUUID where the browser offers it, and assembles from crypto.getRandomValues otherwise — never from Math.random.
- Database primary keys where sequences leak information (order counts, user counts).
- Idempotency keys for payment/API retries.
- Un-guessable file names and share tokens (pair with real access control — an obscure name is not a lock).
Anatomy of the string
A UUID like 550e8400-e29b-41d4-a716-446655440000 is 32 hex digits in five groups (8-4-4-4-12). In a v4, the version is hiding in plain sight: the first digit of the third group is always 4, and the first digit of the fourth group is always 8, 9, a or b (the variant marker). The remaining 122 positions are the random payload. Knowing the anatomy lets you eyeball a UUID's type in logs — a small party trick that has diagnosed real bugs: a 'random' ID whose third group starts with 1 is a time-based v1 leaking its creation time and machine address, which is sometimes exactly what you did not want to publish.
When NOT to use a random UUID
Random UUIDs are unordered, which at database scale means index fragmentation: millions of v4 keys inserted randomly can slow writes versus sequential IDs. That is the honest trade behind the v7 (time-ordered) fashion in modern systems. For APIs, tokens, test data and anything human-scale, v4 from this page is correct and battle-tested; for a billion-row table's primary key, generate v7 in your stack's library and think about ordering. Knowing which randomness a job needs is the senior version of this tool — the page gives you the right default and tells you where its edge is.
UUIDs in URLs and filenames: practical notes
A UUID in a URL is unguessable but not a password: anyone with the link has the resource, so pair UUID links with expiry or login checks for anything private. In filenames, UUIDs shine — collision-free across machines and mergers of folders, at the cost of human meaning; the working compromise is date + slug + short UUID fragment ('2026-01_invoice_3f2a9c.pdf'), readable in a listing and unique in a system. Generate the full UUIDs here and slice the fragment you need — the randomness is uniform throughout the string, so any eight characters carry the same entropy per character.
Frequently asked questions
UUID vs GUID?
Same thing, two traditions: GUID is Microsoft's name for the same 128-bit format. These paste happily into either world.
Uppercase or lowercase?
Generated lowercase per the RFC's canonical text form; most systems accept either, and many normalise on save.
Can I get v1/v7 time-ordered UUIDs?
This tool does v4 (random). For database performance at scale, time-ordered v7 is lovely — generate those in your app's library, not a web toy.