UUID v7 Generator
Generate 1 to 1,000 UUID v7 values that stay in creation order on one page, and decode a UUID to its version, variant and timestamp. How it works
Use the UUID v7 Generator
About the UUID v7 Generator
A UUID v7 starts with a 48-bit Unix timestamp in milliseconds, so its text form sorts in time order. This generator makes 1 to 1,000 and keeps them strictly increasing within one page, even inside one millisecond; across tabs or machines the order is only right to the millisecond. The decoder reads the version, variant and, for v1, v6 and v7, the timestamp.
UUIDs the decoder reads
| UUID | Version | Timestamp (ms) | ISO 8601 |
|---|---|---|---|
| 017f22e2-79b0-7cc3-98c4-dc0c0c07398f | 7 | 1645557742000 | 2022-02-22T19:22:22.000Z |
| c232ab00-9414-11ec-b3c8-9e6bdeced846 | 1 | 1645557742000 | 2022-02-22T19:22:22.000Z |
| ffffffff-ffff-7fff-bfff-ffffffffffff | 7 | 281474976710655 | +010889-08-02T05:31:50.655Z |
| 550e8400-e29b-41d4-a716-446655440000 | 4 | none | none |
What the Decode button shows. A v4 UUID carries no timestamp. The third row is the largest 48-bit value, the last millisecond a v7 UUID can hold.
How to use this tool
- Type a quantity from 1 to 1,000 and press Generate.
- Tick Uppercase or untick Hyphens if your system wants that form; the list and the copy follow.
- Press Copy All for the list, or the copy button on a row for one UUID.
- To read a UUID, paste it into the decode box and press Decode.
Frequently asked questions
- Is UUID v7 sortable?
- Yes, by time. The 48-bit millisecond timestamp comes first, so the text form sorts in creation order (RFC 9562 section 6.11). Two UUIDs from the same millisecond sort by the counter that follows.
- Are UUIDs made in the same millisecond in order?
- On one page, yes. The 12-bit field after the version is a counter that starts at a random value below 2,048 in each new millisecond and goes up by 1 for each UUID, so 1,000 UUIDs made in one millisecond stay in creation order. If the counter would pass 4095 the timestamp moves one millisecond ahead. The guarantee covers a single generator: two tabs order their UUIDs only to the accuracy of the clock, and two machines can disagree by far more, since their clocks can differ by much more than a millisecond.
- How do I read the timestamp in a UUID v7?
- The first 12 hex digits are the Unix time in milliseconds. In 017f22e2-79b0-7cc3-98c4-dc0c0c07398f, 017f22e279b0 is 1645557742000, which is 2022-02-22T19:22:22.000Z.
- Which UUID formats can the decoder read?
- The 8-4-4-4-12 form, the same 32 hex digits without hyphens, with braces around it, or with a urn:uuid: prefix, in upper or lower case. Anything else gets the message Not a UUID, with the format it expects.
- Should I use UUID v7 or v4 for database keys?
- RFC 9562 says time-ordered values keep new rows close together in an index, while v4 values land at random positions, which it says can hurt performance. A v7 UUID also shows its creation time to anyone who has it, which a v4 UUID does not.
- Can two UUID v7 values collide?
- Not on one page: each value is above the one before. Values from different pages or machines can repeat only if they share the millisecond, the 12-bit counter and all 62 random bits, which are drawn fresh for every UUID; two values with the same timestamp and counter match by chance 1 time in 2^62, about 4.6 × 10^18. RFC 9562 section 6.8 says true global uniqueness cannot be guaranteed without a shared scheme, so keep a unique constraint on a key column.
Related Tools
View all toolsULID Generator
Generate 1 to 500 ULIDs, 26-character IDs that sort by creation time, in upper or lower case, and decode any ULID to the date it was made.
UUID Generator
Generate 1 to 1,000 random v4 UUIDs, or time-based v1, or name-based v5 and v3 from a namespace and a name, and copy them. Repeats of v4 are very unlikely.
PBKDF2 Calculator
Derive a PBKDF2 key in hex or Base64 from a password and salt with HMAC-SHA-1, SHA-256, SHA-384 or SHA-512, and check it against a key you paste.
RegEx Playground
Try 11 regex presets, from email, phone and IPv4 to semver and hex color, on sample text, see every match, and read what each pattern does not check.
Base58 Address Encoder
Encode hex or text to Base58 or Base58Check and decode it back. Base58Check shows the version byte, the payload and whether the 4-byte checksum matches.
Base64 Converter
Encode text to Base64 or decode Base64 to text. UTF-8, standard and URL-safe alphabets, optional padding on decode, up to 250,000 characters.