UUID Generator
Generate random version-4 UUIDs, one or many at a time, ready to copy.
๐Collision-proof IDs on demand
Generate batches of version-4 UUIDsโ 128-bit identifiers random enough that the whole world can mint them independently without ever colliding. Built on your browser's crypto.randomUUID(), so the randomness is cryptographic and nothing is fetched from a server.
๐งฎThe maths of "universally unique"
The 36-character format (8-4-4-4-12 hex digits) carries 122 bits of randomness โ the 4 in the third group marks the version, and the first character of the fourth group encodes the variant. You'd need to generate a billion UUIDs per second for ~85 years to reach even a 50% chance of one duplicate.
3f9c1b2e-8a4d-4e6f-9b7a-2c5d8e1f0a3bโ note the 4 starting the third block: that's the version marker every v4 UUID carries.๐กWhere UUIDs shine
- Database primary keys that can be created on any device before syncing.
- File names, order numbers, and session IDs that must never clash.
- Test data and API keys during development.
- Anywhere sequential IDs would leak information (order 10001 tells competitors your volume; a UUID tells nothing).
๐ก Frequently Asked Questions
What is a UUID?+
A Universally Unique Identifier โ a 128-bit value written as 36 hex characters (8-4-4-4-12). Version 4, generated here, is built from 122 cryptographically random bits, making collisions practically impossible.
Can two UUIDs ever be the same?+
Theoretically yes, practically no: with 2ยนยฒยฒ possibilities you'd need about 85 years of a billion UUIDs per second for a 50% chance of a single duplicate. Systems worldwide rely on this.
What does the 4 in every UUID mean?+
It's the version field โ the first character of the third group. A 4 there means version 4 (random). Other versions exist (v1 uses timestamps and MAC addresses; v7 is time-ordered) but v4 is the everyday default.
Are these UUIDs secure/random enough for tokens?+
They use crypto.randomUUID(), which draws from your device's cryptographic generator. For session identifiers that's generally fine; for secrets, prefer a purpose-built token with more bits (see our Password Generator).
UUID vs auto-increment ID โ which should I use?+
Auto-increment is compact and ordered but predictable and centralised. UUIDs can be minted anywhere, merge safely across databases, and leak nothing about volume. Modern distributed apps default to UUIDs.