Skip to content
Toolcroft

Validators

UUID Validator - Validate & Decode UUID Online

Validate any UUID string instantly. Detects version (v1–v8), variant, and decodes the timestamp for v1 UUIDs. 100% client-side.

UUID Validator

Paste any UUID (also called GUID) into the field above and the tool instantly tells you whether it is well-formed, which version it is, and which variant specification it follows.

UUID versions

v1 encodes the MAC address of the generating host and a 60-bit timestamp. v3 / v5 are name-based (MD5 and SHA-1 respectively). v4 is randomly generated and the most common format today. v6 / v7 are reordered time-based variants that sort better in databases. v8 is reserved for custom implementations.

Accepted formats

The standard hyphenated lowercase form (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx), uppercase, brace-wrapped ({...}), and hyphen-free 32-character hex strings are all accepted.

Validation algorithm

UUID validation involves two checks:

  1. Structure check: the string must match the pattern /^[0-9a-f]8-[0-9a-f]4-[1-8][0-9a-f]3-[89ab][0-9a-f]3-[0-9a-f]12$/i - correct hyphen positions, only hex characters, version nibble 1–8 in the 5th position.
  2. Variant byte check: bits 6–7 of the 9th byte (first byte of the 4th group) must be 10 in binary for RFC 4122 UUIDs. This means the character must be one of 8, 9, a, b.

Non-RFC UUID variants

Not all GUIDs follow RFC 4122. Common variations include:

  • Microsoft brace-wrapped GUIDs: {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}, used in Windows Registry, COM, and .NET. This tool accepts and normalizes them.
  • Windows mixed-endian GUIDs: fields 1, 2, and 3 are stored little-endian on disk (e.g., in binary COM formats), which byte-swaps the first three groups compared to RFC 4122. This is a storage detail that doesn’t affect the string representation.

When to validate UUIDs

  • At API boundaries: validate UUID path parameters and query strings to reject malformed input before it reaches the database layer.
  • Before database inserts: an invalid UUID stored as a string in a UUID-typed column will cause a runtime error; catching it at the application layer gives a cleaner error message.
  • In backend code: use a well-tested library (e.g., uuid-validate in Node.js, uuid.UUID in Python) rather than hand-rolling the regex - library implementations handle all edge cases including variant and version bytes.