All tools

UUID v7 Generator

Generate time-ordered UUID v7 identifiers for database primary keys that sort by creation time.

Browser onlyYour input is processed in this browser and is not sent to SpeedyTools servers.
Share:
Generate UUID v7
01a1f827-1e8d-71c2-8b5a-b39cbb5ebdf213

UUID v7 is a time-ordered UUID suitable for database primary keys.

Bulk Generate
About UUID v7

UUID v7 is a time-ordered UUID format. The first 48 bits hold a Unix timestamp in milliseconds and the rest are random, so the UUIDs sort by creation time and stay unique.

UUID v4 values can't be sorted by time. UUID v1 values can, but they include the generating machine's MAC address. UUID v7 sorts by time without exposing a MAC address.

Features
UUID v7 from the current timestamp
IDs sort by creation time
Generate up to 100 UUIDs at once
History of the last 20 UUIDs
Copy to clipboard
No external dependencies
Common use cases

Database keys

Primary keys that sort by insertion time

Logging

IDs for log entries that sort by time

Distributed systems

Sortable IDs generated on many servers without coordination

Event streams

Ordered event IDs for streaming systems

Frequently asked questions

What is UUID v7?

UUID v7 is a time-ordered UUID format defined in RFC 9562. It stores a Unix timestamp in milliseconds in the first 48 bits, followed by random data. UUID v4 is fully random, but UUID v7 values sort in the order they were created.

Why use time-ordered UUIDs?

Like auto-increment IDs, they sort in insertion order, which keeps B-tree indexes compact. Like other UUIDs, any machine can generate them without coordination, and they don't reveal how many rows you have. That makes them a good fit for distributed systems.

How is UUID v7 different from UUID v4?

UUID v4 is fully random, so it can't be sorted by time. UUID v7 starts with a timestamp, so it sorts by creation time and suits primary keys where insertion order matters.

Can I use UUID v7 as database primary keys?

Yes. This is the main use case for UUID v7. Because each new value is larger than the last, new rows go at the end of the index instead of at random positions as with UUID v4, which keeps B-tree inserts cheap.

What about UUID v1?

UUID v1 also contains a timestamp, but it includes the MAC address of the machine that generated it, which can identify that machine. UUID v7 uses random bits instead of a MAC address and still sorts by time.

Private by default

The tool generates UUIDs in your browser and sends nothing to a server.