regula.tools
100% Client-SideGenerators

RFC 9562 UUIDv7 Generator (Time-Ordered)

Pre-configured for RFC 9562 Section 5.7 UUIDv7, this generator combines a 48-bit Unix millisecond timestamp prefix with 74 bits of cryptographically secure random entropy (`crypto.getRandomValues()`). Unlike random UUIDv4, UUIDv7 sorts chronologically to prevent B-Tree index fragmentation in PostgreSQL and MySQL.

Loading workspace...

#How to Use This Tool

1Pre-selected in RFC 9562 UUIDv7 mode with 5 ready-to-copy time-ordered IDs.
2Adjust the batch quantity (1–100) or toggle uppercase, hyphens, and braces.
3Click Generate to mint fresh CSPRNG-backed UUIDv7 keys in browser RAM.

#Mathematical Formula & Standards

An RFC 9562 UUIDv7 packs a 48-bit big-endian `unix_ts_ms` timestamp into the most significant bits, followed by the 4-bit version nibble `0111` (`7`), 12 bits of `rand_a`, the 2-bit RFC variant `10`, and 62 bits of CSPRNG `rand_b`. Total entropy is 74 bits with millisecond-level monotonic ordering.

#Edge Cases & Technical Considerations

Why UUIDv7 Outperforms UUIDv4 in SQL B-Tree Indexes

Random UUIDv4 keys insert into random B-Tree leaf pages, causing frequent page splits and cache misses on large tables. UUIDv7 keys append sequentially at the right edge of the B-Tree like `BIGINT` sequences.

Timestamp Exposure Consideration

Because the first 48 bits encode creation time (`unix_ts_ms`), avoid exposing raw UUIDv7 values if exact record creation timestamps are considered sensitive.

#Frequently Asked Questions

Q:What is the difference between UUIDv4 and UUIDv7?

UUIDv4 uses 122 purely random bits, which fragments database B-Tree indexes. UUIDv7 (RFC 9562) puts a 48-bit Unix millisecond timestamp first, making IDs naturally time-sortable while keeping 74 CSPRNG random bits.

Q:Are generated UUIDv7 values stored or sent to a server?

Never. All generation happens in your browser via `crypto.getRandomValues()`, and only formatting preferences (count/hyphens/case) are shared in URLs.

Have feedback or feature requests?

Help us improve this utility. Share suggestions, report edge cases, or request new features directly.

Send Feedback