Quick answer

A valid UUID (v4 or other) is 32 hexadecimal characters in the form 8-4-4-4-12 with optional hyphens.

Invalid UUID Format

A valid UUID (v4 or other) is 32 hexadecimal characters in the form 8-4-4-4-12 with optional hyphens. Wrong length, non-hex characters, or bad structure cause validation errors.

Common causes

How to fix

An invalid UUID format error means the identifier does not match the standard UUID structure: 32 hexadecimal characters arranged as 8-4-4-4-12, usually separated by hyphens. This page helps you identify why a UUID fails validation, how to correct common formatting mistakes, and where UUID checks are used in software systems, APIs, databases, and configuration files. Developers, QA teams, and technical support staff often use UUID validation to catch malformed IDs before they break requests, records, or integrations.

How This Validator Works

A UUID validator checks whether an input matches the expected syntax for a universally unique identifier. In its common textual form, a UUID contains five groups of hexadecimal characters separated by hyphens, such as xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. The validator typically verifies:

If any of these conditions fail, the UUID is considered invalid format, even if it looks similar to a real identifier.

Common Validation Errors

Where This Validator Is Commonly Used

Why Validation Matters

UUID validation helps systems reject malformed identifiers early, before they cause downstream errors. A bad UUID can lead to failed API calls, missing database records, broken lookups, or confusing support cases. Validating format at the edge improves data quality, reduces retry noise, and makes error handling more predictable. It also helps teams distinguish between a truly missing record and a request that was never valid in the first place.

Technical Details

The canonical UUID text representation is defined by a hexadecimal pattern with hyphens in the 8-4-4-4-12 layout. In many implementations, the underlying value is 128 bits, encoded as 32 hex digits. Common UUID versions include version 1, 3, 4, and 5, with version and variant bits embedded in the string. Some systems accept uppercase hex, while others normalize to lowercase. Parsers may also support brace-wrapped or URN forms, but those are application-specific rather than universal.

Check Expected
Format 8-4-4-4-12 hexadecimal characters
Total hex digits 32
Allowed characters 0-9, a-f, A-F
Hyphen positions After 8, 12, 16, and 20 hex characters
Optional checks Version and variant validation

FAQ

What does invalid UUID format mean?

It means the value does not match the expected UUID syntax. The most common issue is a string that is too short, too long, or contains characters outside hexadecimal notation. Some systems also reject UUIDs with incorrect hyphen placement or unsupported version and variant bits.

What is the correct UUID format?

The standard textual UUID format is 8-4-4-4-12, using hexadecimal characters only. A typical example looks like 550e8400-e29b-41d4-a716-446655440000. The exact acceptance rules can vary slightly by language, library, or API, but this pattern is the most widely used.

Can uppercase UUIDs be valid?

Yes, many validators accept uppercase hexadecimal characters because hex is case-insensitive. However, some systems normalize UUIDs to lowercase for consistency. If a parser rejects uppercase input, it is usually due to a stricter application rule rather than the UUID standard itself.

Why does my UUID fail after copying and pasting?

Copying from logs, emails, spreadsheets, or JSON output can add hidden spaces, quotes, line breaks, or punctuation. A UUID may also be truncated if only part of the string was copied. Trimming whitespace and checking the full 36-character representation often resolves the issue.

Do all UUIDs have hyphens?

Not always. The common human-readable form includes hyphens, but some systems store or transmit UUIDs as a 32-character hex string without separators. Whether that is valid depends on the parser or API contract. If a tool expects the hyphenated form, the unhyphenated version may be rejected.

Is a UUID the same as a GUID?

In many contexts, yes. GUID and UUID are often used interchangeably, especially in Microsoft and cross-platform software discussions. The naming differs, but the underlying identifier format is usually the same 128-bit value represented in a standard textual form.

Can a UUID be all zeros?

Technically, a string of zeros may match the UUID pattern, but some applications treat the nil UUID as a special placeholder rather than a normal identifier. Whether it is accepted depends on the system’s business rules and whether nil values are allowed in that field.

What should I check if an API says the UUID is invalid?

First confirm the exact field format expected by the API. Then verify length, hyphen placement, allowed characters, and whether the API requires a specific UUID version. Also check for whitespace, quotes, or encoding issues in JSON, query parameters, or form submissions.

Can a UUID validator detect whether an ID actually exists?

No. Format validation only checks whether the string looks like a valid UUID. It does not confirm that the identifier exists in a database, belongs to a user, or points to a real resource. Existence checks require a lookup against the relevant system or data store.

Related Validators & Checkers

FAQ

What is the correct UUID format?
8-4-4-4-12 hex digits, e.g. 550e8400-e29b-41d4-a716-446655440000. Lowercase or uppercase hex is fine.
Does UUID validation check version?
Format validators check structure; version/variant are in specific nibbles (e.g. v4 has version 4 in the 13th character).

Fix it now

Try in validator (prefill this example)

Related

All tools · Canonical