Skip to main content
NeatUtility

UUID v7 Generator & Inspector

Security & Hashing100% Client-Side
Ready
TEXT
0 lines0 chars
0 B / 97.7 KB
About this tool, examples & FAQ

Generate and inspect time-ordered RFC 9562 Version 7 UUIDs with 48-bit millisecond epoch timestamps and high-entropy randomness entirely in your browser. Eliminates database B-tree index fragmentation while preserving uniqueness.

Key facts

Verified capabilities and limits of this utility
SpecificationRFC 9562 Section 5.7 (Universally Unique Identifiers - UUID Version 7)
Timestamp precision48-bit Big-Endian Unix epoch milliseconds (valid until year 10889 AD)
Randomness bits74 bits of cryptographically secure pseudo-random entropy (crypto.getRandomValues)
SortabilityMonotonically sortable by creation time across database indexes
Supported operationsGenerate time-ordered UUIDs or Inspect / Decode embedded timestamps and metadata
Execution deadline1.5 s
Processing locationBrowser-only: zero server generation, zero logging

How to use

  1. To generate: Click 'Run' to generate a batch of Version 7 UUIDs ordered by the current timestamp.
  2. Choose formatting options: Uppercase letters or Hyphen-free (32 characters).
  3. Optionally enter a custom date (ISO-8601 or epoch ms) in Options to seed UUIDs for historical backfilling or migrations.
  4. To inspect: Paste an existing UUID v7 into the input editor and switch to the 'Inspect / Decode UUID' operation.
  5. View the exact creation timestamp (UTC and local), epoch milliseconds, version (7), and RFC variant.

Example

Inspect RFC 9562 UUID v7

Input

018d3ce1-f110-7092-ba7d-a7ffcb4b214f

Sample output (illustrative)

{
  "uuid": "018d3ce1-f110-7092-ba7d-a7ffcb4b214f",
  "version": 7,
  "versionName": "Version 7 (Unix Epoch time-based with random)",
  "variant": "RFC 9562 / RFC 4122 Standard (0b10)",
  "isVersion7": true,
  "timestamp": {
    "unixEpochMs": 1706123456784,
    "unixEpochSeconds": 1706123456,
    "isoUtc": "2024-01-24T19:10:56.784Z"
  },
  "hyphenated": "018d3ce1-f110-7092-ba7d-a7ffcb4b214f",
  "hex32": "018d3ce1f1107092ba7da7ffcb4b214f"
}

Edge cases

UUID v4 vs UUID v7

UUID v4 is entirely random, which causes severe B-tree page splits when used as a database primary key. UUID v7 places a 48-bit millisecond timestamp at the beginning, ensuring chronological insert order while retaining 74 random bits.

Sub-millisecond monotonicity

When generating multiple UUIDs within the exact same millisecond, the 12-bit rand_a field can act as an incrementing sequence counter or additional entropy pool.

Inspection of other UUID versions

The inspector operation correctly recognizes other versions (such as v4, v1) and indicates when a timestamp is not present or non-standard.

How it works

  1. Takes the current Unix epoch millisecond timestamp (or user-specified seed timestamp).
  2. Encodes the 48-bit timestamp into the first 6 bytes in Big-Endian order.
  3. Draws cryptographically secure random bytes from Web Cryptography for the remaining 10 bytes.
  4. Sets the 4-bit version field to 7 (0b0111) and the 2-bit variant field to RFC standard (0b10).
  5. Formats the 128-bit value into canonical 8-4-4-4-12 hex notation.

Frequently asked questions

Why should I use UUID v7 instead of UUID v4?

UUID v7 is designed specifically for database primary keys (PostgreSQL, MySQL, SQLite, MongoDB). Because the first 48 bits encode the creation timestamp, new IDs are naturally sequential, drastically reducing index page fragmentation and improving write throughput.

Can UUID v7 collide?

With 74 bits of entropy per millisecond, a collision would require generating millions of IDs per millisecond on a single node without coordination. For normal distributed applications, collision risk is effectively zero.

Does UUID v7 leak information?

Because UUID v7 contains the creation timestamp with millisecond precision, anyone with the UUID can determine when the record was created. If creation time is sensitive, use UUID v4 instead.

Is UUID v7 an official IETF standard?

Yes. RFC 9562 was officially published by the IETF in May 2024, obsoleting RFC 4122 and standardizing UUID versions 6, 7, and 8.

References