UUID Validator

Validate a UUID's format, version, and variant bits against RFC 4122, not just that it's 36 characters with dashes in the right places.

Valid UUID

Versionv4
VariantRFC 4122

Checks the standard 8-4-4-4-12 hex format along with the version (1-8) and variant bits defined by RFC 4122, not just that it's 36 characters with dashes in the right places.

Example input

550e8400-e29b-41d4-a716-446655440000

Example output

Valid UUID, version 4

What is a UUID Validator?

A string that's 36 characters long with dashes in roughly the right places can still be an invalid UUID. The UUID standard (RFC 4122) specifies exact rules beyond just the overall shape, a specific hex digit marks the version, and another marks the variant, and both have to fall within defined valid ranges. A naive check that only verifies length and dash positions will happily accept strings that aren't actually standards-compliant UUIDs, which matters if the ID is going into a system, database column, or API that expects a genuinely valid one.

When to use it

This is useful when validating user input or data coming from an external source that's supposed to contain a UUID, confirming an ID from an API response, a URL parameter, or an uploaded file is actually well-formed before trusting it. It's also useful for double-checking a UUID you've generated or copied by hand hasn't been corrupted or truncated, and for understanding what a specific UUID's version tells you about how it was generated (fully random, timestamp-based, and so on).

How it works

The check first confirms the overall structure, 32 hex digits grouped as 8-4-4-4-12, then inspects two specific positions: the first digit of the third group must be a valid version number (1 through 8, per current RFC 4122 usage), and the first digit of the fourth group must be 8, 9, a, or b to satisfy the variant requirement. A string that matches the general shape but fails either of these specific checks isn't a standards-compliant UUID, even though it might superficially look like one.

Frequently asked questions

Is a GUID validated the same way as a UUID?

Yes, GUID is Microsoft's name for the same format standardized as UUID in RFC 4122, so the same validation rules (structure, version digit, variant bits) apply to both without any translation needed.

Why did my UUID fail validation even though it's 36 characters with dashes?

Length and dash placement alone aren't sufficient, the string also needs a valid version digit (1-8) at a specific position and valid variant bits (starting with 8, 9, a, or b) at another specific position. A string that's the right shape but fails either of those checks isn't a properly formed UUID, even though it looks correct at a glance.

What does the UUID version number actually tell me?

It tells you how the UUID was generated. Version 4 (the most common) is fully random. Version 1 embeds a timestamp and MAC address. Version 7 (newer) embeds a timestamp for chronological sortability. Knowing the version can help you understand or debug where an ID came from.