← All tools
// DEVELOPER

UUID v4 Generator online

Generate random UUID v4 identifiers — single or bulk.

UUID v4 Generator logo
by
CHUNKY
MUNSTER
UUID v4 GENERATOR

About UUID v4

UUID v4 uses 122 random bits, giving 2¹²² ≈ 5.3 × 10³⁶ possible values. The probability of generating a duplicate in 103 trillion UUIDs is roughly 1 in a billion. Uses the browser's crypto.randomUUID() API when available for cryptographic quality.

How to Use uuid-v4-generator

  1. Click Generate UUID to produce a single version 4 UUID.
  2. Use the count input (1–1000) to generate a batch.
  3. Select the output format: standard hyphenated, uppercase, or no hyphens.
  4. Click any UUID or the Copy All button to copy to clipboard.

UUID v4 identifiers are generated from cryptographic randomness — 122 random bits with 6 bits for the version and variant markers. They are the standard choice for distributed system identifiers, object IDs in NoSQL stores, API keys, and anywhere you need a unique string without a centralised counter. This generator uses crypto.randomUUID() — the browser's native CSPRNG-backed implementation.

UUID v4 Structure

The UUID format is xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx where: all x are random hex digits; the 4 is fixed (version marker); and y is one of 8, 9, a, or b (the two high bits are 10, identifying the RFC 4122 variant). A UUID is 128 bits, written as 32 hex characters plus 4 hyphens = 36 total characters. Without hyphens, it is 32 characters.

Frequently Asked Questions

What does "cryptographically random" mean for UUID generation?

It means the random bits come from a CSPRNG (Cryptographically Secure Pseudo-Random Number Generator) seeded from hardware entropy. This makes the generated UUIDs unpredictable and suitable for security tokens, not just identifiers.

Can I use UUID v4 as an API key?

You can, but a v4 UUID's 122 bits of randomness is on the lower end for security tokens. Most security guidelines recommend 128–256 random bits for session tokens. A UUID works in moderate-security scenarios; for high-security APIs, use a dedicated token generator with at least 128 bits.

What is UUID v7 and when should I use it?

UUID v7 (RFC 9562) uses a 48-bit Unix timestamp at the most significant bits, followed by random bits. This makes v7 UUIDs time-sortable — sequential by creation time — which dramatically improves B-tree database index performance compared to the random ordering of v4.

Are two UUIDs from this generator ever the same?

Collisions are theoretically possible but practically impossible. The birthday paradox calculation puts a 50% collision chance at approximately 2.7 × 10¹⁸ UUIDs — you would need to generate billions per second for decades.

See also the UUID Generator, Random String Generator, and Password Generator.