Developer & Data UtilitiesUpdated: September 2026

UUID & GUID Generator (v4 & v7 RFC 9562)

Generate cryptographically secure random UUID v4 and time-ordered UUID v7 identifiers in bulk. Configure uppercase, hyphens, braces, and inspect RFC 9562 bit layouts.

Research: LocalTooldeck Financial & Engineering Team
Audit: Verified for Mathematical Accuracy
Advertisement
Reserved 728×90 Top Responsive LeaderboardCLS Guard: Strict Layout Reservation (min-height: 250px)

100% Secure & Client-Side: Generated locally using browser Web Cryptography APIs. Never transmitted to external servers.

Entropy: 122 bits / UUID

RFC Structural Bit Inspector (First Identifier)

Specification Versionv4 (Random)
VariantRFC 4122 / 9562 (Leach-Salz)
Decoded TimestampN/A (Fully Random)
Total Entropy122 bits (2^122 states)

The Evolution of Universally Unique Identifiers: From RFC 4122 to RFC 9562

A Universally Unique Identifier (UUID), also designated as a Globally Unique Identifier (GUID) in Microsoft systems, is a standardized 128-bit label mathematically guaranteed to be unique across time and space without requiring coordination through a centralized registration authority or database lock. Formally codified by the Internet Engineering Task Force (IETF) in 2005 under RFC 4122, UUIDs have formed the backbone of distributed databases, microservice tracing tokens, and web session management.

In May 2024, the IETF ratified RFC 9562, superseding RFC 4122 and standardizing three new time-ordered formats: UUID Version 6, Version 7, and Version 8. This overhaul resolved critical architectural bottlenecks created by random UUID v4 keys in modern high-throughput relational databases.

UUID Structural Layout and 128-Bit Representation

In its canonical textual representation, a UUID is formatted as a 36-character hexadecimal string divided into five groups separated by hyphens (the 8-4-4-4-12 pattern):

xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx
// M represents the 4-bit version digit (e.g., 4 or 7)
// N represents the 2-to-3-bit variant (8, 9, a, or b for standard RFC Leach-Salz)

The B-Tree Index Fragmentation Problem: Why UUID v7 Was Born

For nearly two decades, UUID v4 was the default primary key choice for microservices because generating keys did not require an auto-increment sequence lock. However, when database tables grow into millions of rows, UUID v4 introduces severe performance degradation:

  • Random B-Tree Page Splits: Relational databases store clustered primary key indexes as balanced trees (B+ Trees) sorted lexicographically. Because UUID v4 is uniformly random, new inserts hit random leaf pages across disk storage. When leaf pages fill up, the storage engine must split the page, rewrite neighbor pointers, and flush dirty buffers.
  • Cache Eviction Thrashing: Because inserts are non-sequential, the database cannot maintain a "hot" working set in its InnoDB or PostgreSQL shared buffer pool. Every insertion forces an SSD I/O read of an unrelated index branch.
  • The UUID v7 Solution: UUID v7 embeds a 48-bit millisecond Unix Epoch timestamp at the beginning of the identifier. All identifiers generated in the same millisecond share the same prefix, ensuring that new records are inserted sequentially at the rightmost leaf of the B-tree index. This restores the sequential write speed of traditional auto-increment integers while retaining global distributed uniqueness.

Comparison Matrix: UUID Version Specifications

SpecificationPrimary MechanismSortabilityEntropyRecommended Use Case
UUID v160-bit timestamp + MAC addressPoor (timestamp reversed)Low (Hardware bound)Legacy systems (Privacy hazard due to MAC leak)
UUID v3 & v5MD5 (v3) / SHA-1 (v5) namespace hashNone (Hash-random)DeterministicDeterministic entity ID generation from natural keys
UUID v4CSPRNG Random Number GeneratorNone (Fully random)122 bitsSecurity tokens, ephemeral session IDs, non-indexed IDs
UUID v748-bit Unix timestamp + 74 bits entropyNatural Chronological Order74 bitsModern Database Primary Keys (PostgreSQL, MySQL, SQLite)

Mathematical Collision Probability Analysis

A common concern when adopting random identifiers is the theoretical probability of generating duplicate values (a hash collision). The mathematics of the Birthday Paradox governs collision frequency:

In UUID v4, 6 bits are fixed to denote the version (0100) and variant (10xx), leaving exactly 122 bits of unconstrained entropy:

N = 2^122 ≈ 5.3169 × 10^36 distinct identifiers

To achieve a mere one-in-a-billion (1 × 10-9) probability of a single collision, a distributed system would have to generate approximately 103 trillion UUIDs. Even at a generation velocity of 1 billion UUIDs per second, it would require 103,000 seconds (over 28 hours) of sustained generation to reach that infinitesimal risk threshold.

Advertisement
Reserved 336×280 In-Content RectangleCLS Guard: Strict Layout Reservation (min-height: 280px)

Frequently Asked Questions (US Standards)

What is the primary difference between UUID v4 and UUID v7?
UUID v4 (RFC 4122) is generated entirely from 122 pseudo-random or cryptographically secure random bits, distributing values evenly across the 128-bit space. UUID v7 (standardized in RFC 9562 in 2024) encodes a 48-bit millisecond Unix timestamp in its most significant bits followed by 74 bits of entropy. This gives UUID v7 natural time-ordered monotonicity, eliminating B-tree database index fragmentation while preserving high entropy.
Why does UUID v4 degrade relational database performance at scale?
Because UUID v4 values are entirely random, inserting them as primary keys causes random page writes across database B-tree indexes (index cache thrashing). When tables grow larger than RAM buffer pools, every new INSERT requires loading an arbitrary leaf page from SSD/disk. Sequential UUID v7 addresses this by appending new records sequentially at the end of the index tree.
How are UUIDs generated securely in the browser runtime?
Modern web browsers implement the W3C Web Cryptography API. UUID v4 is generated via crypto.randomUUID() or crypto.getRandomValues(), which pull high-quality entropy directly from the underlying operating system kernel CSPRNG (Cryptographically Secure Pseudo-Random Number Generator, such as /dev/urandom on Unix/Linux or CryptGenRandom / BCryptGenRandom on Windows).
What is the difference between a UUID and a Microsoft GUID?
Globally Unique Identifiers (GUIDs) are Microsoft implementation standards derived from ISO/IEC 11578 and DCE 1.1. Historically, GUIDs differed from standard network-byte-order UUIDs due to little-endian byte ordering in their first three groupings (time_low, time_mid, time_hi). Modern GUIDs in .NET and Windows conform directly to RFC 4122 / RFC 9562 formatting.
Advertisement
Reserved Responsive Bottom PlacementCLS Guard: Strict Layout Reservation (min-height: 250px)
Advertisement
Reserved 320×100 Mobile Anchor