Generate high‑entropy, cryptographically secure random UUIDs using your browser's Web Crypto API. Perfect for distributed systems, database primary keys, session tokens, and any scenario requiring globally unique identifiers. Fully standards‑compliant, with bulk generation and flexible formatting.
crypto.getRandomValues(). No data leaves your device.
A Globally Unique Identifier (GUID) or Universally Unique Identifier (UUID) is a 128‑bit number used to uniquely identify information in computer systems. The standard is defined by RFC 4122 (IETF) and ISO/IEC 9834‑8:2014. The most common representation is a 36‑character string of hexadecimal digits, grouped as xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
Version 4 UUIDs are generated from random or pseudo‑random numbers. They provide high entropy (122 random bits) and do not require any central coordination, MAC addresses, or timestamps, making them ideal for distributed environments.
UUID v4 internal layout:
48 random bits + 4‑bit version (0100) + 12 random bits + 2‑bit variant (10) + 62 random bits
Total entropy ≈ 122 bits → probability of collision ≈ 1 / 2122
crypto.getRandomValues), UUIDs are unpredictable and suitable for security tokens.| Version | Generation method | Characteristics | Typical use |
|---|---|---|---|
| v1 (time‑based) | Timestamp + MAC address / node | Time‑ordered, but may leak host info | Legacy systems, approximate ordering (not recommended for security) |
| v3 / v5 (name‑based) | MD5 (v3) or SHA‑1 (v5) of namespace + name | Deterministic: same input yields same UUID | Generating fixed IDs from domain names, URLs, etc. |
| v4 (random) | 122 random bits + fixed version/variant | High entropy, no information leakage, no coordination | Primary keys, session IDs, random identifiers, distributed systems |
| v6‑v8 (draft) | Time‑ordered random (v7) or custom | Future standards combining time and randomness | Database‑friendly ordered UUIDs (v7), experimental use (v8) |
A global e‑commerce platform migrated from auto‑increment integers to UUID v4 for order IDs across 50 microservices. After three years and over 2 billion orders, zero collisions have been reported. UUIDs eliminated the need for a central sequence generator and reduced contention in sharded databases. The slight storage overhead (16 bytes binary vs. 8 bytes integer) was offset by simplified application logic and improved security (orders can’t be enumerated).
With 122 random bits, the chance of a collision among N UUIDs is approximately N² / (2 * 2¹²²) (birthday problem). Even after generating 1 billion UUIDs per second for 100 years, the probability of a single collision remains below 10⁻¹². For practical purposes, you can treat v4 UUIDs as unique.
This tool exclusively uses window.crypto.getRandomValues(), a CSPRNG (Cryptographically Secure Pseudo‑Random Number Generator) backed by the operating system’s entropy pool (e.g., /dev/urandom on Linux, CryptGenRandom on Windows). This ensures that the generated UUIDs are suitable for security‑sensitive applications such as password reset tokens, API keys, and session identifiers.
Math.random() is not cryptographically secure and has lower entropy; always use a CSPRNG for UUID generation in production.Our generator strictly follows RFC 4122 section 4.4 (“Algorithms for Creating a UUID from Truly Random or Pseudo‑Random Numbers”). We obtain 16 random bytes, then set the version (bits 48‑51 of the UUID) to 0b0100 (byte index 6, high nibble = 4) and the variant (bits 64‑65) to 0b10 (byte index 8, high two bits = 10). The code is open for inspection and uses only standard Web APIs.
Generating 10,000 UUIDs with this tool takes less than 100ms on a typical laptop. For server‑side generation, the same JavaScript can be used in Node.js (via crypto.randomUUID() or crypto.randomBytes()). The algorithm is linear and memory‑efficient.
The IETF is currently working on an update to RFC 4122 (draft‑uuidrev) that introduces new versions: v6 (reordered v1), v7 (time‑ordered random, great for databases), and v8 (custom). GetZenQuery will offer v7 generators once the specification is final. Meanwhile, v4 remains the most widely supported and secure choice.
f47ac10b-58cc-4372-a567-0e02b2c3d479 – the “4” in the third group confirms version, “a” confirms variant.crypto.getRandomValues() is supported in all modern browsers (Chrome, Firefox, Edge, Safari). Internet Explorer is not supported. For legacy environments, consider a polyfill, but it will not be cryptographically strong.