English
ToolAcre Brand Logo
ToolAcrePractical Web Toolkit
homeHomechevron_rightWorkspacechevron_rightActive Tool Console
lock CSPRNG window.crypto.randomUUID() • Zero Server Generation RFC 9562

UUID & GUID Generator

Generate cryptographically secure v4 random UUIDs, monotonic time-ordered v7 identifiers for high-throughput relational databases, and custom legacy formats in browser memory.

tag
Collision Risk < 1 in 10³⁶ combinations
tune

Specification & Format

Local Web Crypto
Max 100 per cycle
Encoding & Casing
Delimiter (Multi-Output)
ADVERTISEMENT
Sponsor: High-performance Cloud DB Engine
Primary Identifier Result 128-bit payload
e8b39d1b-3ef5-46b7-a37a-42c2be9fdce2
Cryptographic Strength 122 Bits Random Entropy
CSPRNG • 5.3×10³⁶ distinct states Zero client storage

Batch Stream

5 items
check_circle Ready to paste into Postgres, MySQL, MongoDB, JSON APIs UTF-8 / Plain
verified Copied UUID to system clipboard!
Bit-Level Specification

Anatomy of RFC 9562 UUIDv4 vs UUIDv7

UUIDs comprise exactly 128 bits represented as 32 hexadecimal digits divided by hyphens. Understanding bit assignments prevents subtle collision regressions.

time_low / rand_a 32 bits (8 hex) e8b39d1b
time_mid 16 bits (4 hex) 3ef5
ver (4 bits) + rand 16 bits (4 hex) 46b7 [v4]
var (2 bits) + rand 16 bits (4 hex) a37a
rand_b (node) 48 bits (12 hex) 42c2be9fdce2
MSB (Most Significant Bit - Bit 0) Total 128 Bits = 16 Octets LSB (Least Significant Bit - Bit 127)
B-Tree Fragmentation & Index Analysis

Choosing the Right Primary Key: UUIDv4 vs UUIDv7 vs ULID vs Snowflake

In high-write workloads, purely random keys (like UUIDv4) force random write I/O across database leaf pages, causing heavy page splits, buffer pool pollution, and cache invalidation.

UUIDv4 (Random) High Split
~42% Index Size

Severe leaf-page fragmentation in PostgreSQL B-Trees above 10M rows.

UUIDv7 (RFC 9562) Optimized
< 4% Overhead

Time-ordered sequential insertion keeps write buffers tightly clustered.

ULID Crockford
26 Chars

Base32 URL-safe string representation, 1.21e+24 unique values per ms.

Snowflake 64-bit Int
BIGINT

Requires coordinated cluster worker IDs; native hardware 64-bit comparisons.

Standard Identifier Size / Type Sortability Random Bits B-Tree Health Best Application
UUID Version 4 128 bits (36 char) Non-sequential 122 bits Poor (Heavy page churn) Public tokens, session IDs, opaque keys
UUID Version 7 128 bits (36 char) Monotonic Time-order 74 bits Excellent (Append only) Modern RDBMS Primary Keys (Postgres, MySQL 8)
ULID 128 bits (26 char Base32) Monotonic Time-order 80 bits Excellent (Append only) NoSQL documents, URL-safe path slugs
Twitter Snowflake 64 bits (BIGINT) Monotonic Time-order 12 bits sequence Optimal (Native 8-byte ints) Massive distributed feeds, messaging events
UUID Version 1 128 bits (36 char) Timestamp scrambled 0 (Node MAC based) Moderate Legacy systems (Leaked MAC privacy risk)
Engineering Documentation

Frequently Asked Questions

Is this generator safe for production secrets?

Yes. Identifiers are generated directly inside your active browser context via the Web Cryptography API (window.crypto.getRandomValues and randomUUID()). No string or seed ever transmits across the wire or touches external telemetry servers.

Why migrate from UUIDv4 to UUIDv7?

UUIDv4 distributes inserts completely at random across your B-tree index. When tables exceed physical RAM, each write requires reading random disk blocks into memory. UUIDv7 prefixes a 48-bit millisecond timestamp, assuring high-speed, sequential index writes without central coordination.

What is the exact collision probability of UUIDv4?

To reach a 50% probability of a single collision (birthday paradox), you would need to continuously produce 1 billion UUIDs every second for 85 years (approx. 2.71 × 10¹⁸ UUIDs). For distributed services, it is practically collision-immune.

Can I convert these UUIDs to binary columns?

Yes. Storing UUIDs as UUID in PostgreSQL or BINARY(16) in MySQL cuts storage by 55% compared to VARCHAR(36) and boosts query search speed.