UUID v7 Decoder
Bulk Generate
UUID v7 vs UUID v4
| Feature | UUID v7 | UUID v4 |
|---|---|---|
| Sortable | Time-ordered | Random order |
| Timestamp | 48-bit ms precision | None |
| Random bits | 74 bits | 122 bits |
| DB index performance | Excellent (sequential) | Poor (fragmented) |
| Standard | RFC 9562 | RFC 4122 |
| Format | 36 chars (8-4-4-4-12) | 36 chars (8-4-4-4-12) |
| Version nibble | 0111 (7) | 0100 (4) |
| Use case | DB keys, event streams | Opaque tokens, secrets |
What Is a UUID v7?
UUID v7 is the time-ordered UUID version introduced in RFC 9562 (2024). It encodes a 48-bit Unix timestamp in milliseconds in the most significant bits, followed by 74 bits of randomness. Because the timestamp leads, UUID v7 values sort chronologically as both strings and raw bytes — giving you the distributed uniqueness of a UUID with the index-friendliness of an auto-increment integer.
018f0ecb-a94e-7000-8000-4a4197e8c642
^^^^^^^^^^^^^ ^
48-bit timestamp version 7
Why Use UUID v7 Instead of UUID v4?
Random UUID v4 identifiers scatter inserts across the entire B-tree index, causing page splits, cache misses, and slower writes at scale. UUID v7 fixes this: new IDs are always greater than older ones, so inserts land at the end of the index — no fragmentation, hot pages stay cached, and you get sequential I/O. For the full performance breakdown, read UUID as a database primary key.
- Sortable: Time-ordered by creation, unlike random v4
- Database-friendly: Append-only inserts, like sequential integers
- Still unique: 74 random bits make same-millisecond collisions effectively impossible
- No machine leak: Unlike UUID v1, no MAC address is embedded
When to Use UUID v7
- Database primary keys in PostgreSQL, MySQL, or SQL Server where insert performance and ordering matter
- Event streams and logs that benefit from chronological ordering out of the box
- Distributed systems that need coordination-free IDs that still sort by time
- Append-heavy tables where random v4 keys would fragment the index
If you need a random, non-time-revealing identifier instead, use the UUID v4 generator. To choose between v7 and other sortable formats, see UUID v7 vs ULID.
Generating UUID v7 in Code
Most ecosystems now support v7 directly. Here are the common ways to generate one:
// JavaScript / TypeScript (uuid library)
import { v7 as uuidv7 } from 'uuid';
uuidv7(); // "018f0ecb-a94e-7000-..."
# Python (uuid6 backport)
from uuid6 import uuid7
uuid7()
-- PostgreSQL 18+
SELECT uuidv7();
For snippets in Java, Go, Rust, and more, see how to generate UUIDs in code.
Decode a UUID v7 Timestamp
Every UUID v7 carries its creation time. Paste any v7 value into the UUID v7 Decoder above to extract the embedded millisecond timestamp, or use the full UUID decoder to inspect the version, variant, and structure of any UUID. Wondering whether two v7 values could ever match? Read UUID collision probability.
Related UUID Guides
- UUID versions explained — v1, v3, v4, v5, v6, and v7 compared
- UUID v7 vs ULID — picking the right time-ordered identifier
- UUID as a database primary key — v4 vs v7 indexing and storage
Latest Articles
GUID vs UUID: Difference, Format, and Generator Guide (2026)
Are GUID and UUID the same thing? Learn GUID vs UUID terminology, string format, byte order, .NET and SQL Server usage, and when to use each name.
UUID Alternatives: ULID, NanoID, CUID, and Short UUID Compared
Compare UUID alternatives like ULID, NanoID, CUID, and short UUIDs. Learn when to use each and their trade-offs for unique ID generation.
UUID as Database Primary Key: v4 vs v7 Best Practices
Should you use UUIDs as primary keys? Compare UUID v4 vs v7, PostgreSQL and MySQL storage, index performance, migration patterns, and hybrid key designs.
Frequently Asked Questions
What is UUID v7?
How is UUID v7 different from UUID v4?
What is RFC 9562?
When should I use UUID v7 instead of UUID v4?
What are the database performance benefits of UUID v7?
Is this tool free?
Related Tools
More Developer Tools
Random IBAN
randomiban.co
Random IMEI
randomimei.com
Random MAC
randommac.com
Password Gen
password-generator.co
Lorem Ipsum
makelorem.com
JSON Format
jsonformat.co
Hex to ASCII
hextoascii.co
Base64
base64decode.co
Hash Gen
hashgenerator.co
Char Counter
charcounter.io
QR Code
makeqrcode.io
URL Encode
urlencode.co
Morse Code
decodemorse.com
Binary Text
texttobinary.io
HTML Entities
htmlentities.io
Age Calc
calculateage.io
Compound Calc
compoundcalculator.io