UUID v7 Generator
Generate time-sortable UUID v7 identifiers, in bulk, with a built-in v7 timestamp inspector.
Generated with your browser's crypto API - nothing is sent to a server.
019f5035-05ac-72e5-9089-7d9bd03fdc93UUID Inspector
Paste any UUID to identify its version - v7 UUIDs reveal their embedded creation timestamp.
UUID Format Breakdown
- 4 is the version digit (4 = random, 7 = time-sortable)
- y is the variant (8, 9, a, or b)
- In v7, the first 48 bits are a Unix millisecond timestamp, so IDs sort by creation time
- Total: 128 bits = 32 hex digits + 4 dashes = 36 characters
Code Examples
// Node 20+ / modern runtimes
import { v7 as uuidv7 } from 'uuid';
uuidv7(); // "0197b3f0-5e7a-7cc3-a2ae-5c2fbe23d3b4"Frequently Asked Questions
What is UUID v7?
UUID v7 (RFC 9562, 2024) starts with a 48-bit Unix millisecond timestamp followed by random bits. IDs generated later always sort after earlier ones, which keeps database B-tree indexes fast - the main weakness of random UUID v4 keys.
Should I use UUID v7 for database primary keys?
For new schemas, usually yes. v7 keys insert in near-sequential order, avoiding the index fragmentation that random v4 keys cause. PostgreSQL 18 ships a native uuidv7() function for exactly this reason.
Can I extract the timestamp from a UUID v7?
Yes - the first 12 hex digits are the millisecond timestamp. Paste any v7 UUID into the inspector on this page to see its creation time. Only use this for debugging; don't build logic on it.
When is UUID v4 still the better choice?
When creation time must not leak. A v7 UUID reveals exactly when it was generated, which can be sensitive for things like account IDs or invite codes. v4 is fully random and reveals nothing.
Related Tools
This tool runs entirely in your browser - nothing you enter is uploaded or stored.