UUID Generator

Generate cryptographically secure UUID v4 (random) and UUID v7 (time-ordered) identifiers. Bulk batch generation, custom formatting, and zero collision probability.

Generator Options

Quick Quantity
Generated Identifiers (0 Active)
RFC 4122 / 9562 Compliant

Total Count

0

Specification

UUID v4

Entropy

122 bits

Style

standard

Zero Collision Guarantee

Generating 1 billion UUID v4 identifiers per second for 100 consecutive years yields less than a 0.0000000001% statistical probability of collision.

RFC 4122 & RFC 9562 UUID Bit Allocation

A 128-bit UUID consists of 32 hexadecimal characters arranged in 5 hyphenated groups ($8-4-4-4-12$). Version 4 yields 122 bits of raw entropy after reserving version and variant flags.

1. UUID v4 Structure & Entropy Bits
Total Entropy=128 bits − 4 (version) − 2 (variant)=122 bits (2¹²² ≈ 5.3 × 10³⁶)
2. Birthday Paradox Collision Probability Approximation
P(collision)
2 × 2¹²²
1.06 × 10³⁷
Step-by-Step UUID v4 Construction Breakdown
Step 1: Draw 16 Cryptographic Random Bytes (128 bits)
Bytes: [0xf4, 0x7a, 0xc1, 0x0b, 0x58, 0xcc, 0x43, 0x72, 0xa5, 0x67, 0x0e, 0x02, 0xb2, 0xc3, 0xd4, 0x79]
Step 2: Inject Version 4 (`0x40`) & RFC 4122 Variant (`0x80`)
Byte 6 = (Byte[6] & 0x0f) | 0x40 → Version 4
Byte 8 = (Byte[8] & 0x3f) | 0x80 → Variant 10
Step 3: Hex Encoded Hyphenated String
Formatted Token=f47ac10b-58cc-4372-a567-0e02b2c3d479

UUID Version Comparison Matrix

VersionGeneration BasisChronological SortOptimal Use Case
UUID v4122-bit CSPRNG RandomnessNo (Random)API keys, security tokens, web sessions
UUID v7 (New)48-bit Epoch ms + 74-bit RandomYes (Sequential)Database primary keys (B-Tree friendly)
UUID v1Timestamp + Node MAC AddressPartiallyLegacy enterprise systems
UUID v5SHA-1 Namespace + Name HashNo (Deterministic)Deterministic idempotent resource mapping

Frequently Asked Questions

What is a UUID and why is it globally unique?
A UUID (Universally Unique Identifier) is a 128-bit identifier providing 5.3 × 10^36 possible combinations. The probability of two independently generated UUID v4 colliding is astronomically low (1 in 5.3 undecillion).
What is the difference between UUID v4 and UUID v7?
UUID v4 is entirely random (122 entropy bits), ideal for unpredictable API keys and tokens. UUID v7 prefixes a 48-bit millisecond timestamp before 74 random bits, making it time-ordered and optimal for database primary keys (B-Tree index friendly).
Is this UUID generator cryptographically secure?
Yes. The generator utilizes the browser's native window.crypto.getRandomValues() CSPRNG engine, ensuring true high-entropy randomness.
What is the difference between a UUID and a GUID?
They refer to the exact same 128-bit RFC 4122 specification. GUID (Globally Unique Identifier) is Microsoft's implementation terminology.

Related Tools