← UUID v7 Generator

UUID v7 Generator vs Alternatives: Time-Ordered UUIDs

Reviewed by the OnlineFree.app team · Updated

Key points

  • UUID v7 starts with a 48-bit Unix millisecond timestamp, so newer IDs sort after older ones in plain byte order.
  • UUID v7 Generator creates 1 to 1000 RFC 9562 values per batch entirely in the browser, with no signup.
  • Turning hyphens off returns a 32-character compact UUID suited to URLs and storage keys.
  • Time-ordered keys reduce index fragmentation versus UUID v4, but they reveal approximate creation time.
  • Two UUIDs sharing the same millisecond are not guaranteed to be strictly monotonic.

What is a UUID v7?

A UUID v7 is a 128-bit identifier defined in RFC 9562 whose first 48 bits are a Unix timestamp in milliseconds, which means values created later sort after earlier ones in plain byte or string order. That single design choice is why it has become the default recommendation for database primary keys that used to rely on UUID v4.

The layout is fixed: 48 bits of millisecond timestamp, a 4-bit version field set to 0111, 12 bits of rand_a, a 2-bit variant field set to 10, then 62 bits of rand_b. That leaves 74 random bits per value, so two UUIDs created in the same millisecond still do not collide in practice. Rendering is the familiar 8-4-4-4-12 hex grouping — 36 characters with hyphens, or 32 characters when the hyphens are dropped.

UUID v7 is standardised alongside v4 and v6 in RFC 9562, published by the IETF in May 2024. Because the format is stable and the version and variant nibbles are checked by validators, a v7 value drops into any existing UUID column with no schema change.

How does UUID v7 compare with UUID v4?

UUID v4 spends all 122 free bits on randomness, so a list of v4 values looks shuffled and gives your index nothing to sort by. UUID v7 spends 48 of its bits on a timestamp, which makes inserts roughly append-only instead of scattering writes across the whole B-tree.

For a medium-traffic table, that difference shows up as fewer page splits, a smaller working set, and better cache hit rates on the primary key index. Random keys are not broken, but they are measurably more expensive to maintain at scale, and no amount of hardware tuning removes the randomness.

The trade-off runs the other way for privacy. A UUID v7 embeds the moment it was created, rounded to the millisecond; anyone holding the ID can read that timestamp. If an identifier leaks user activity timing — invite links, session tokens, order numbers shown publicly — UUID v4 is the safer pick, since it reveals nothing.

Both are 128-bit, both fit the same column type, and both are generated without a central coordinator. The honest summary: choose v7 for storage keys and join columns, choose v4 when the ID itself should carry no information.

Generate a batch in three steps

Open UUID v7 Generator and the results panel is already full — the page generates ten values on load with lowercase, hyphenated defaults, so you never land on an empty screen. The whole thing sits on one screen with three controls: a count field and two toggles.

Set the count to anything from 1 to 1000. Ten is the default for a quick paste; 1000 is the ceiling for seed data. Out-of-range entries are clamped silently to the nearest bound, and non-numeric input falls back to 10, so you get values rather than an error dialog.

Flip Uppercase if your system stores uppercase hex, and flip Include hyphens off to get the 32-character compact form used in URLs and object storage keys. Press Generate, then use Copy all for the clipboard or Download .txt for a plain-text file written client-side through a Blob URL. A counter under the list confirms how many values came back and which format was used.

Nothing is uploaded: the batch is built in your browser, and the list is ordered oldest to newest exactly as generated. Refreshing discards it, so download the file if you need a record.

UUID v7 vs ULID, Snowflake IDs, and database defaults

ULID solves the same sorting problem with a different encoding: 48-bit millisecond timestamp plus 80 random bits, rendered as 26 Crockford base32 characters. It is shorter and case-insensitive, but it is not an RFC 9562 UUID, so a UUID column will reject it. Stay with UUID v7 if your schema, ORM, or API contract already speaks UUID.

Snowflake-style IDs are 64-bit integers built from a timestamp, a machine ID, and a per-millisecond counter. They are compact and fast, but they require you to assign worker IDs and run a clock you trust — coordination overhead that a UUID generator avoids entirely. Reach for them when the ID must be a number, not when you merely want ordering.

The strongest alternative is often your database. PostgreSQL 18, released in September 2025, ships a built-in uuidv7() function, documented in the PostgreSQL UUID functions reference, and MySQL users can approximate ordering with UUID_TO_BIN and the swap flag. If the database can produce the value on insert, that removes a round trip from your application code.

The browser tool wins in the gaps: fixture files, SQL seed scripts, API test payloads, backfill migrations, and documentation samples. Anywhere you need a paste-ready block of valid, sortable IDs with zero dependencies and no signup, generating them here is faster than writing a script.

Limits worth knowing before you paste

Timestamp resolution is one millisecond. The tool emits values in generation order, oldest to newest, but two UUIDs whose timestamp portion is identical are not guaranteed to sort by an internal counter — RFC 9562 permits a monotonic sub-millisecond counter, yet you should not assume one exists. If you need a strictly increasing sequence, generate it in your database or application runtime where ordering is enforced.

Collision risk is negligible at 74 random bits per value but not zero, so keep the unique constraint on the column. Never use a UUID v7 as a security token, password reset link, or session secret: the embedded timestamp narrows the search space and the format is public. For security-critical randomness, generate IDs in your own runtime with a cryptographically secure random source and treat this page as a formatting and fixture helper.

There is also no history and no server-side state. Reloading loses the batch, batches are capped at 1000, and larger volumes need chunking or a script. Always round-trip a few sample values through your actual database and validation layer before trusting a bulk import — especially if you switched to the compact 32-character form, which some tooling rejects.

Used within those bounds it is a fast, private way to get correctly formatted values. It is one of several utilities on OnlineFree.app, and if you also need fake hardware addresses for the same fixtures, Random MAC Generator covers that in the same no-signup style.

Frequently asked questions

Is UUID v7 Generator free, and do I need an account?

It is free and requires no account, email, or signup. You open the page, choose a batch size from 1 to 1000, and copy or download the results. Generation happens entirely in your browser, so the UUIDs are never sent to a server, and the page produces ten values on load so it is never blank.

Are the values from UUID v7 Generator real RFC 9562 UUIDs?

Yes. Each value has the version nibble set to 7, the variant bits set to 10, and a 48-bit Unix millisecond timestamp in the first characters, which is the layout RFC 9562 specifies for UUID version 7. If you need a cryptographic randomness guarantee for security tokens, generate them in your own runtime with a CSPRNG instead.

Can I use UUID v7 as a database primary key?

Yes, and it is a common choice because the time prefix keeps inserts roughly append-only, which reduces index fragmentation compared with UUID v4. Store it in a native UUID column. If your database can generate v7 itself, for example PostgreSQL 18's uuidv7() function, doing it on insert avoids an extra round trip.

What is the difference between UUID v7 and UUID v4?

UUID v4 uses 122 random bits and carries no time information, so values look randomly ordered. UUID v7 uses 48 bits of millisecond timestamp plus 74 random bits, so newer IDs sort after older ones and index writes stay more sequential. The downside is that v7 leaks its approximate creation time to anyone who reads it.

How many UUIDs can I generate at once with UUID v7 Generator?

One batch is limited to between 1 and 1000 values, with a default of 10. Values outside that range are clamped silently to the nearest bound, and non-numeric input falls back to 10. For larger sets, download several batches as .txt files or generate them in a script.

References

Try UUID v7 Generator free — no sign-up, works in your browser
Open the tool →

More free tools

Step-by-step guides in our blog & guides.

Prozentrechner Online Kostenlos Mit Rechenweg Logo Maker With Canva Shopify Profit Calculator Universal Online Converter Hub Custom PRD build WebM to MP4 Converter Abi Notenrechner Bayern How Can I Create An Invoice Online For Free ICS Calendar Generator Word & Character Counter Online Free