UUID v7 Generator
Generate UUID v7 identifiers with embedded Unix Epoch timestamps, bulk generation, and format options
Input
Output
Readme
What is UUID v7?
UUID v7 is the newest version of Universally Unique Identifiers defined in RFC 9562. Unlike older versions like UUID v4 (purely random) or UUID v1 (uses MAC address), UUID v7 embeds a 48-bit Unix Epoch timestamp in milliseconds directly into the identifier. This makes UUID v7 values naturally sortable by creation time — a major advantage for database indexing, distributed systems, and event logging where chronological ordering matters.
Because UUID v7 does not incorporate MAC addresses, it avoids the privacy concerns associated with UUID v1. The remaining bits after the timestamp and version/variant fields are filled with random or monotonic data, ensuring uniqueness even when multiple UUIDs are generated within the same millisecond.
How UUID v7 is constructed
A UUID v7 consists of 128 bits organized as follows:
- Bits 0–47: A 48-bit big-endian unsigned Unix Epoch timestamp in milliseconds
- Bits 48–51: The 4-bit version field, set to
0111(7) - Bits 52–63: 12 bits of random or monotonic data for sub-millisecond precision or uniqueness
- Bits 64–65: The 2-bit variant field, set to
10(RFC 9562) - Bits 66–127: 62 bits of random or monotonic data for additional uniqueness
This structure means that UUIDs generated later in time will always sort after earlier ones at the millisecond level, making them ideal as primary keys in B-tree indexed databases.
Tool description
This UUID v7 generator creates RFC 9562-compliant version 7 UUIDs with a visual breakdown of the embedded timestamp. Generate one or up to 100 UUIDs at once, toggle between uppercase and lowercase formatting, and choose whether to include hyphens. The tool also extracts and displays the embedded Unix Epoch timestamp from the first generated UUID, letting you verify the creation time encoded in each identifier.
Examples
| Format | Example output |
|---|---|
| Standard | 019544a2-3b4c-7d8e-9f01-2a3b4c5d6e7f |
| Uppercase | 019544A2-3B4C-7D8E-9F01-2A3B4C5D6E7F |
| No hyphens | 019544a23b4c7d8e9f012a3b4c5d6e7f |
Features
- Bulk generation: Generate 1 to 100 UUID v7 values at once with a quantity slider
- Uppercase toggle: Switch between lowercase and uppercase output
- Hyphens toggle: Include or remove hyphens for compact formats
- Timestamp extraction: Automatically displays the embedded Unix Epoch timestamp from the generated UUID
- Download support: Export generated UUIDs as a text file for batch use
Use cases
- Generate time-sortable primary keys for large-scale databases where insert performance and locality matter
- Create monotonically increasing identifiers for distributed event streaming systems like Kafka or Pulsar
- Replace UUID v4 in applications that need chronological ordering without a separate timestamp column
UUID v7 vs other versions
| Version | Time-based | Sortable | Privacy-safe | Randomness |
|---|---|---|---|---|
| v1 | Yes | No | No (uses MAC) | Low |
| v4 | No | No | Yes | High |
| v6 | Yes | Yes | No (uses MAC) | Low |
| v7 | Yes | Yes | Yes | Medium |
UUID v7 combines the best qualities: time-based sortability without exposing hardware identifiers, with enough randomness to prevent collisions across distributed nodes.
Options explained
- Quantity (1–100): How many UUID v7 values to generate in a single batch. All UUIDs in a batch share the same approximate timestamp but differ in their random bits.
- Uppercase: When enabled, outputs UUIDs with uppercase hex characters (A–F instead of a–f).
- Hyphens: When enabled (default), UUIDs include the standard 8-4-4-4-12 hyphen grouping. Disable for a compact 32-character hex string.
FAQ
Can UUID v7 collide?
Collisions are extremely unlikely. Even within the same millisecond, the 74 bits of random/monotonic data provide over 18 quintillion possible combinations. The uuid library also uses monotonic counters to guarantee uniqueness within a process.
Is UUID v7 backwards-compatible with UUID v4? Yes. UUID v7 follows the same 128-bit, 8-4-4-4-12 format and is valid wherever UUIDs are accepted. Existing UUID columns, parsers, and validators work without modification.
When should I use UUID v7 instead of UUID v4? Use UUID v7 when your use case benefits from time-ordered keys — for example, as database primary keys where B-tree index performance improves with sequential inserts. Use UUID v4 when ordering is irrelevant and you want maximum randomness.