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.
Specification & Format
Batch Stream
5 itemsAnatomy 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.
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.
Severe leaf-page fragmentation in PostgreSQL B-Trees above 10M rows.
Time-ordered sequential insertion keeps write buffers tightly clustered.
Base32 URL-safe string representation, 1.21e+24 unique values per ms.
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) |
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.
Related Security & Developer Tools
View all 50+ tools arrow_forwardDiceware and cryptographically secure multi-word passphrase engine.
Decode, verify claims, and inspect JSON Web Token header payloads locally.
Compute SHA-256, SHA-512, and HMAC digests via browser subtle crypto.
Tree validation, schema checking, and high-performance minification.
