UUID Generator
Random v4 or time-ordered v7 UUIDs — one or thousands, in the format you need.
- Free
- No sign-up
- Runs in your browser
Generate UUIDs
Version
0 × v4 · made on your device with crypto-grade randomness
UUID validator & decoder
Check any UUID or GUID: version, variant and — for v1, v6 and v7 — when it was created.
Accepts the usual forms: with or without hyphens, in braces, upper or lower case, or as urn:uuid:….
Nil UUID
00000000-0000-0000-0000-000000000000
All 128 bits zero. Use it for “no ID yet” instead of an empty string.
Max UUID
ffffffff-ffff-ffff-ffff-ffffffffffff
All 128 bits one (RFC 9562). Handy as an upper bound in range queries.
How UUIDs work
A UUID (also called a GUID) is a 128-bit identifier written as 32 hexadecimal digits in five groups: 8-4-4-4-12. Two parts are fixed: the first digit of the third group is the version, and the first digit of the fourth group (8, 9, a or b) marks the standard variant. Everything else is filled in according to the version.
Take the v7 UUID 017f22e2-79b0-7cc3-98c4-dc0c0c07398f. The first 12 digits, 017f22e279b0, are the creation time: 0x017f22e279b0 = 1,645,557,742,000 milliseconds after 1 January 1970, which is 22 February 2022, 19:22:22 UTC. The “7” starting the third group is the version, the “9” starting the fourth group is the variant, and the remaining 74 bits are random. Paste it into the decoder above to see the same result.
UUID v4 or v7 — which should I use?
Version 4 is fully random (122 random bits) and reveals nothing about when or where it was made — the safe default for tokens and public IDs. Version 7 starts with a timestamp, so new IDs sort after older ones. That keeps database indexes compact and makes v7 a good primary key in PostgreSQL, MySQL and similar databases. Within the same millisecond, this generator still keeps v7 IDs in creation order by stepping the random part forward, as RFC 9562 allows.
Can two UUIDs ever be the same?
In practice, no. With 122 random bits there are about 5.3 × 10³⁶ possible v4 UUIDs; you would need to generate around a billion per second for about 86 years to reach a 50% chance of a single duplicate. That only holds with a good random source — this tool uses your browser’s cryptographic generator (crypto.randomUUID and crypto.getRandomValues), never Math.random.
Frequently asked questions
- Are these UUIDs generated on a server?
- No. They are created in your browser and are never sent anywhere, so nobody else has a copy.
- What’s the difference between a UUID and a GUID?
- Nothing, apart from the name. GUID is Microsoft’s term; Windows tools often show GUIDs in upper case and inside braces, which you can turn on above.
- Can I tell when a UUID was created?
- Only for time-based versions. v7 stores Unix time in milliseconds, and v1 and v6 store time in 100-nanosecond steps since 1582; the decoder shows it. v4 is random and contains no time.
- Is a UUID without hyphens still valid?
- Yes. The 32 hex digits carry the same value; the hyphens only make it easier to read. Most databases and libraries accept both forms.