UUID Generator
About this tool
Generate UUIDs defined by RFC 9562: version 4, which is random, and version 7, which is time-ordered. Up to 1000 values per run, one per line.
Which version to use
- v4 — 122 random bits. Use it when you only need an identifier that will not collide. Nothing about the value is ordered.
- v7 — a 48-bit Unix timestamp in milliseconds, then random bits. Values sort by creation time at millisecond resolution, which makes them useful as database keys and log identifiers.
How the values are generated
-
v4 uses
crypto.randomUUID()where the browser provides it. Otherwise 16 bytes come fromcrypto.getRandomValuesand the version and variant bits are set. -
v7 reads
Date.now(), writes the low 48 bits as the timestamp, sets the version and variant bits, and fills the remaining 74 bits with random data.
RFC 9562 replaced RFC 4122 in 2024. Version 7 is the part that is genuinely new; v4 is unchanged.
Example
v7: 01a149db-ad80-71b1-a1bd-a450971ce86f first 12 hex digits 01a149dbad80 as milliseconds 1792240496000 as a date 2026-10-17 12:34:56 UTC version nibble 7 (third group: 71b1) variant nibble a (fourth group: a1bd)
In a v7 the leading 48 bits are readable as a timestamp; everything after the version and variant is random.
Uniqueness
A UUID is statistically unique, not guaranteed unique. For v4, generating a billion values gives a collision probability of roughly 9 × 10-20. That is negligible in practice, but it is not zero, and it assumes a sound random source.
v7 values are ordered only across milliseconds. Two values generated in the same millisecond have random tails and do not sort in creation order, so do not rely on v7 alone to resolve ordering within a millisecond.
Limits
- Only v4 and v7 are produced. v1, v3 and v5 (name-based) are not offered.
- No monotonic counter, so ordering inside one millisecond is not guaranteed.
- The count is capped at 1000, and the whole batch is produced in one synchronous loop.
- The last output and settings are kept in
localStorage.
FAQ
What is the difference between v4 and v7?
v4 is almost entirely random. v7 embeds a Unix timestamp in milliseconds in the high bits, so values generated later tend to sort after earlier ones while still carrying random bits.
Are UUIDs guaranteed to be unique?
No. Collisions are astronomically unlikely with a correct random source, but the guarantee is statistical, not absolute.
Does v7 sort correctly inside the same millisecond?
No. Only the timestamp is ordered; the rest is random, so two values from the same millisecond can appear in either order.
Why does the page keep old UUIDs after reload?
The last output is restored from localStorage. Click
Generate again for fresh values.
Further reading
UUID v4 vs UUID v7 compares the two versions, including the same-millisecond ordering caveat and what a v7 reveals about when a record was created.