UUID Generator & Version Validator

Generate cryptographically random UUIDs v4/v7 and validate the version of any UUID

Ad placeholder (leaderboard)

A UUID (Universally Unique Identifier) is a 128-bit value, written as 32 hex digits in the 8-4-4-4-12 pattern, used to label records without a central authority. This tool generates v4 (random) and v7 (time-ordered) UUIDs and validates any UUID, decoding its version, variant, and embedded timestamp.

How it works

A UUID reserves a few bits to describe itself:

  1. The version lives in the first hex digit of the third group (positions 13). A 4 means random; a 7 means Unix-time ordered.
  2. The variant lives in the top bits of the fourth group and is almost always 10xx, marking an RFC 4122/9562 UUID.
  3. For v7, the leading 48 bits hold the millisecond timestamp; for v1, the time fields hold 100-nanosecond intervals since 1582.

When generating, v4 calls crypto.randomUUID() and v7 packs Date.now() plus random bytes, setting the version and variant bits explicitly.

Tips and notes

Prefer v7 for database keys: because the timestamp leads the value, new rows insert at the end of a B-tree index instead of scattering across it, which keeps writes fast and indexes compact. Use v4 when you want IDs that reveal nothing about creation order or timing.

The validator also recognises the special Nil UUID (all zeros) and Max UUID (all f), which are reserved sentinel values rather than real version-bearing identifiers.

Ad placeholder (rectangle)