UUID v7 Generator — Time-Ordered Unique IDs
Generate UUID v7 identifiers — the newest UUID standard that embeds a Unix timestamp for time-ordering. UUID v7s sort chronologically, making them ideal for database primary keys with better index performance than random UUID v4.
What is UUID version 7?
UUID v7 (RFC 9562) embeds a Unix timestamp in milliseconds in the first 48 bits, followed by random bits. This creates time-ordered UUIDs that sort chronologically while maintaining global uniqueness. See: RFC 9562.
Why Use This Tool
- Database primary keys — Better index locality than UUID v4 for databases.
- Event sourcing — Time-ordered event IDs.
- Distributed systems — Sortable IDs across multiple services.
- Audit logs — Naturally time-ordered log entry IDs.
Tips
- Use UUID v7 for database primary keys.
- The timestamp makes IDs naturally sortable.
- First 48 bits = Unix milliseconds.
- Compatible with standard UUID storage.
How to Use the UUID v7 Generator
Generate UUID v7
Click Generate to create a new UUID v7.
View timestamp
See the embedded timestamp decoded.
Generate multiple
Create batch UUIDs if needed.
Copy
Copy the UUID for your application.
Worked Examples
UUID v7 format
Generated
018c3e4c-5a23-7d8b-9f12-abc123def456
First 12 hex chars encode the timestamp.
UUID v7 vs UUID v4
| Feature | UUID v7 | UUID v4 |
|---|---|---|
| Ordering | Time-ordered | Random |
| Sortable | Yes (chronological) | No |
| DB indexes | Better locality | Random scatter |
| Timestamp | Embedded | None |
| Use case | Primary keys, logs | General purpose |
Frequently Asked Questions
Why use UUID v7 over v4?
UUID v7 sorts chronologically, improving database index performance. Sequential IDs have better cache locality than random IDs.
Can I extract the timestamp?
Yes. The first 48 bits are the Unix timestamp in milliseconds. This tool shows the decoded timestamp.
Is UUID v7 as unique as v4?
Yes. The random portion provides enough entropy for uniqueness. The timestamp adds ordering without compromising uniqueness.
What about UUID v6?
UUID v6 reorders v1 fields for sortability. UUID v7 is simpler (Unix timestamp) and recommended for new systems.