UUID v7 Generator

Generate UUID v7 identifiers — the time-sortable UUID standardized in RFC 9562. Each value embeds a 48-bit Unix-millisecond timestamp followed by 74 random bits, so they sort by creation time and make excellent database primary keys. Optional monotonic mode guarantees strictly increasing values within the same millisecond. Generation runs entirely in your browser.

Layout

48-bit Unix-ms timestamp · 4-bit version (7) · 12-bit rand_a · 2-bit variant · 62-bit rand_b. The high-bit timestamp makes UUID v7 lexicographically time-sortable.

Click Generate to create time-ordered UUID v7 ids

How It Works

1

Pick a quantity

Choose how many UUID v7 values to generate — from a single id up to 25 at a time.

2

Generate time-ordered UUIDs

Each id encodes the current Unix-ms timestamp in its first 48 bits and 74 random bits afterwards. Enable monotonic mode to guarantee strict ordering when generating bursts inside the same millisecond.

3

Copy or download

Copy a single UUID, copy the full list, or download as a plain text file. Each row also shows the embedded creation timestamp so you can verify the order.

Frequently Asked Questions

What is a UUID v7?

UUID v7 is a 128-bit identifier defined in RFC 9562 (May 2024). The first 48 bits encode a Unix-millisecond timestamp, followed by a 4-bit version field, 12 bits of randomness (rand_a), a 2-bit variant, and 62 more random bits (rand_b). Because the timestamp is in the high bits, two UUID v7 values can be sorted lexicographically and the result is the same as sorting by creation time.

Why use UUID v7 instead of UUID v4?

UUID v4 is fully random, which scatters inserts across a B-tree index and hurts write performance on large tables. UUID v7 is time-ordered, so new rows append to the right of the index — close to autoincrement performance while keeping the global uniqueness and unguessability of a UUID. PostgreSQL 18 ships a native uuidv7() function for this reason.

What does monotonic mode do?

When you generate many ids inside the same millisecond, two values can land with timestamps that compare equal but a smaller rand_a, breaking strict ordering. Monotonic mode forces rand_a to strictly increase within a single millisecond — useful when you need a stable sort even for high-rate bursts.

Can I extract the timestamp later?

Yes. The first 12 hex characters (or first 6 bytes) are the Unix-millisecond timestamp in big-endian. Use the UUID Decoder tool to parse any UUID v7 back into its timestamp, version, variant, and random bits.

Are the ids cryptographically secure?

Yes. The 74 random bits are drawn from crypto.getRandomValues(), the browser's CSPRNG. The timestamp is not secret, but the random bits make collisions astronomically unlikely and prevent guessing adjacent ids.

Related Tools