iGuideSmart

UUID v4 Generator

Generate 1 to 50 cryptographically secure RFC 4122 Version 4 UUIDs locally via Web Crypto API (crypto.randomUUID) with uppercase and hyphen toggles.

Formula & Calculation Logic

Uses the browser’s native Web Crypto API (`crypto.randomUUID()`), fixing version nibble to `4` and variant bits to `10xx` (8, 9, a, or b).

Primary Formula

xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx (122 bits of CSPRNG entropy)

Example: Anatomy of an RFC 4122 v4 UUID

  1. 1
    Generate 122 cryptographically random bits
    CSPRNG entropy
    5.3 × 10³⁶ possible IDs
  2. 2
    Stamp version 4 and RFC 4122 variant bits
    8-4-4-4-12 hex format
    e.g. 550e8400-e29b-41d4-a716-446655440000

UUID Version Comparison (v1, v4, v7)

Understanding modern RFC 9562 UUID variants.

Showing 4 of 4 reference values
Comparison of UUID versions v1, v4, v5, and v7
VersionSourceSortable?Best Use Case
UUID v4122-bit CSPRNG randomNoGeneral API keys, tokens, distributed IDs
UUID v748-bit Unix ms + randomYes (time)High-write B-tree SQL primary keys
UUID v5SHA-1(namespace + name)DeterministicReproducible content-based IDs
UUID v1Timestamp + MAC addressPartialLegacy systems (leaks host MAC)

Practical Real-World Use Cases

Database Primary Keys & Fixtures

Generate collision-free IDs for SQL seeds, mock APIs, and distributed microservices.

Idempotency & Request Tracing

Create unique correlation headers and webhook test keys.

UUID v4 Generator – Frequently Asked Questions

What is the collision probability of UUID v4?
With 122 random bits, you would need to generate ~2.7 quintillion UUIDs to have a 50% chance of a single duplicate.
Is UUID v4 identical to a GUID?
Yes—Microsoft’s GUID and RFC 4122 UUID share the same 128-bit 8-4-4-4-12 hexadecimal structure.
Does this use Math.random()?
No. It uses the OS-backed Web Crypto CSPRNG (crypto.randomUUID / crypto.getRandomValues).
View all Developer Tools →