Validate & Inspect UUID
Validate a UUID string and extract its version, variant, embedded timestamp, clock sequence, and node identifier. Accepts hyphenated, no-hyphens, URN, and braces formats.
What the Inspector Checks
UUID validation goes beyond a regex match. A string can look like a UUID but contain a version or variant field combination that does not correspond to any defined UUID type. This inspector:
- Parses the UUID from any accepted format (hyphenated, no-hyphens, URN, braces).
- Verifies the string matches the 8-4-4-4-12 hex pattern.
- Extracts the version nibble (bits 48-51) and determines the UUID version.
- Extracts the variant bits (top 2-3 bits of the fourth group) and identifies the layout family.
- For v1 UUIDs: reconstructs the 60-bit Gregorian timestamp and decodes it to a UTC datetime.
- For v7 UUIDs: extracts the Unix millisecond timestamp from the high 48 bits.
- Identifies the special Nil UUID (all zeros) and Max UUID (all ones).
UUID Version Reference
| Version | Version bits | Basis | Defined in |
|---|---|---|---|
| v1 | 0001 | Gregorian time + clock seq + node | RFC 4122 |
| v2 | 0010 | DCE Security / POSIX UID/GID | RFC 4122 |
| v3 | 0011 | Name-based (MD5) | RFC 4122 |
| v4 | 0100 | Random | RFC 4122 |
| v5 | 0101 | Name-based (SHA-1) | RFC 4122 |
| v6 | 0110 | Reordered Gregorian time (sortable v1) | RFC 9562 |
| v7 | 0111 | Unix timestamp (ms) + random | RFC 9562 |
| v8 | 1000 | Custom / vendor-defined | RFC 9562 |
UUID Variant Field
The variant field occupies the top 2-3 bits of the first byte of the fourth UUID group (character 17 of the canonical string):
RFC 4122 / RFC 9562 (variant 1)
Top bits 10xx - the fourth group starts with 8, 9, a, or b. This is the standard for all modern UUIDs.
Microsoft GUID (variant 2)
Top bits 110x - the fourth group starts with c or d. Used by Windows COM, DCOM, and the .NET Guid type with big-endian byte order.
The Nil and Max UUIDs
RFC 9562 defines two special UUID values with no version or variant fields:
Nil UUID
00000000-0000-0000-0000-000000000000
All 128 bits are zero. Used as a null or default UUID value in APIs and databases. Equivalent to null in UUID-typed columns when a missing reference must still be a UUID.
Max UUID (RFC 9562)
ffffffff-ffff-ffff-ffff-ffffffffffff
All 128 bits are one. Introduced in RFC 9562 as a sentinel value. Useful as an upper bound in range queries (WHERE id BETWEEN nil AND max) or as a tombstone marker in CRDT and event-sourced systems.