UUID Generator & Validator

Generate cryptographically random version 4 UUIDs or validate existing UUIDs against the RFC 4122 specification. Generate up to 50 UUIDs at once, toggle between uppercase and lowercase, and copy everything with a single click. All processing happens in your browser - nothing is sent to a server.


Try These Examples

  • Valid v4 UUID - 550e8400-e29b-41d4-a716-446655440000
  • Valid v1-style UUID - 6ba7b810-9dad-11d1-80b4-00c04fd430c8
  • Invalid UUID - not-a-valid-uuid-at-all

How It Works

This tool generates version 4 UUIDs following the RFC 4122 specification. Every UUID is a 128-bit value displayed as 32 hexadecimal digits separated by hyphens in five groups: 8-4-4-4-12.

  • Cryptographic randomness — The tool uses crypto.getRandomValues(), part of the Web Crypto API, to fill a 16-byte array with cryptographically strong random values sourced from the operating system's entropy pool. This is far more secure than Math.random(), which is not cryptographically random.
  • Version nibble — The 7th byte's upper nibble is set to 0100 (hex 4), marking this as a version 4 UUID.
  • Variant bits — The 9th byte's upper two bits are set to 10, indicating the RFC 4122 variant. This means the 17th hex character will always be 8, 9, a, or b.

The validator checks any pasted string against a regular expression that matches all UUID versions (v1 through v5). It reports the detected version and variant, or explains exactly why the input is not a valid UUID.

Frequently Asked Questions

What is a UUID?

A UUID (Universally Unique Identifier) is a 128-bit label used to uniquely identify resources in distributed systems without requiring a central authority. UUIDs follow the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx and are defined by RFC 4122. They are widely used as database primary keys, session tokens, API request identifiers, and correlation IDs.

How are v4 UUIDs generated?

Version 4 UUIDs are generated using random or pseudo-random numbers. This tool uses the Web Crypto API's crypto.getRandomValues() method, which provides cryptographically strong random values sourced from the operating system's entropy pool. The version nibble (the 13th hex digit) is set to 4, and the variant bits (the 17th hex digit) are set to 8, 9, a, or b, per RFC 4122.

Is my data safe when using this tool?

Yes. This tool runs entirely in your browser using JavaScript. UUIDs are generated locally with crypto.getRandomValues(), and any UUIDs you paste for validation never leave your machine. There are no server requests, no analytics on your input, and no data storage.

What is the probability of a v4 UUID collision?

A v4 UUID has 122 random bits, giving roughly 5.3 × 1036 possible values. To have a 50% chance of at least one collision, you would need to generate approximately 2.71 × 1018 (2.71 quintillion) UUIDs. In practical terms, if you generated one billion UUIDs per second, it would take about 86 years to reach that threshold. Collisions are effectively impossible for real-world applications.

Related Tools

← Back to all tools