UUID Validator - Free Online UUID Checker & Verifier
Free online UUID validator and checker. Verify UUID format, detect UUID version (v1, v3, v4, v5), and view structure breakdown. Supports RFC 4122. No registration.
What is a UUID Validator?
A UUID (Universally Unique Identifier) validator checks whether a given string conforms to the RFC 4122 standard for UUIDs. UUIDs are 128-bit identifiers used extensively in software development for generating unique IDs across distributed systems. Our online UUID validator tool instantly checks your UUID for format correctness, identifies the UUID version, and breaks down the structure into its constituent parts — all in your browser with no data sent to any server.
How to Use the UUID Validator
Enter Your UUID
Paste or type a UUID string into the input field. You can enter standard format (with hyphens), URN format (urn:uuid:...), or braces format.
Click Validate
Press the Validate button or just type — the tool checks the UUID format, version bits, and variant bits against RFC 4122.
Review the Results
See if the UUID is valid, what version it belongs to, and view the detailed structure breakdown with each segment highlighted.
Generate New UUIDs
Need a UUID? Click Generate to create a cryptographically secure UUID v4 using the browser's crypto.randomUUID() API.
Common UUID Use Cases
Database Primary Keys
UUIDs serve as globally unique primary keys in distributed databases like PostgreSQL, MongoDB, and Cassandra, allowing data merging without ID conflicts.
API Request Tracking
Assign a UUID to each API request for distributed tracing across microservices, enabling end-to-end request correlation and debugging.
File & Resource Naming
Generate unique filenames for uploaded assets, preventing naming collisions in cloud storage systems like S3 or CDN cache layers.
Session & Token Generation
UUID v4 is widely used for generating session IDs, CSRF tokens, and one-time authentication codes in web applications.
UUID Structure & RFC 4122 Explained
A UUID is a 128-bit number formatted as 32 hexadecimal digits in five groups: 8-4-4-4-12. Each segment encodes specific information depending on the UUID version. The RFC 4122 standard defines how UUIDs are constructed, including the bit-level layout for the version and variant fields.
UUID Format Fields
| Field | Length | Description |
|---|---|---|
time_low | 8 hex | Lower 32 bits of the timestamp (v1) or random data (v4). |
time_mid | 4 hex | Middle 16 bits of the timestamp or random data. |
time_hi_and_version | 4 hex | High 12 bits: version number (bits 13-16). Determines UUID generation method. |
clock_seq_and_variant | 4 hex | Bits 17-18: variant (10xx = RFC 4122). Defines UUID layout standard. |
node | 12 hex | 48-bit node identifier — typically MAC address (v1) or random bits (v4). |
UUID Versions at a Glance
| Version | How It's Generated |
|---|---|
| v1 | Time-based (100ns intervals since 1582-10-15) + MAC address. |
| v3 | Name-based using MD5 hashing. Deterministic for same namespace + name. |
| v4 | Randomly generated. Most common in web development. ~122 random bits. |
| v5 | Name-based using SHA-1 hashing. Prefer over v3 for better collision resistance. |
| Nil | All bits set to zero (00000000-0000-0000-0000-000000000000). Special reserved value. |
Understanding UUID structure helps with debugging. For example, if you see UUID v1 in your logs, you can extract the creation timestamp from the time_low and time_mid fields. UUID v4 provides the best randomness for general use, while v3/v5 are ideal when you need deterministic, reproducible IDs from known inputs.
How to Validate UUIDs in Code
Learn how to validate UUIDs in popular programming languages. Each example shows both validation (checking if a string is a valid UUID) and generation (creating a new UUID).
JavaScript
// Validate UUID
function isValidUUID(str) {
const regex = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
return regex.test(str);
}
// Generate UUID v4
function generateUUID() {
return crypto.randomUUID();
}Python
import uuid
# Validate UUID
def is_valid_uuid(s):
try:
uuid.UUID(s)
return True
except ValueError:
return False
# Generate UUID v4
new_uuid = uuid.uuid4()Java
import java.util.UUID;
// Validate UUID
public static boolean isValidUUID(String s) {
try {
UUID.fromString(s);
return true;
} catch (IllegalArgumentException e) {
return false;
}
}
// Generate UUID v4
UUID uuid = UUID.randomUUID();Go
import "github.com/google/uuid"
// Validate UUID
func isValidUUID(s string) bool {
_, err := uuid.Parse(s)
return err == nil
}
// Generate UUID v4
id := uuid.New()Common UUID Validation Issues
UUID rejected despite looking correct
Check for invisible characters (zero-width spaces, newlines) that might have been accidentally pasted. Also verify that the version nibble (13th character) is 1-5 and the variant nibble (17th character) is 8, 9, a, or b.
Case sensitivity confusion
UUID hex digits are case-insensitive per RFC 4122 — both uppercase (A-F) and lowercase (a-f) are valid. Our tool accepts both and normalizes automatically.
UUID with/without hyphens
The canonical UUID format includes 4 hyphens (8-4-4-4-12). A 32-character hex string without hyphens is technically just the hex representation, not a UUID. Our tool accepts the canonical format with hyphens.
URN format UUIDs
UUIDs prefixed with 'urn:uuid:' are valid per RFC 4122. Our tool automatically strips the URN prefix during validation. Braces-enclosed UUIDs are also supported.
Frequently Asked Questions About UUID Validation
What is a UUID?
A UUID (Universally Unique Identifier) is a 128-bit number used to uniquely identify information in computer systems. UUIDs are standardized by the Open Software Foundation (OSF) as part of the Distributed Computing Environment (DCE) and documented in RFC 4122. They are designed to be globally unique across space and time without requiring a central coordination authority.
What's the difference between UUID and GUID?
UUID (Universally Unique Identifier) and GUID (Globally Unique Identifier) are essentially the same thing. GUID is Microsoft's implementation of the UUID standard. Both are 128-bit identifiers with the same format (8-4-4-4-12 hex digits). In practice, the terms are used interchangeably in software development.
How many UUID versions are there?
There are 5 standard UUID versions defined by RFC 4122: Version 1 (time-based, uses MAC address and timestamp), Version 2 (DCE Security, rarely used), Version 3 (name-based, uses MD5 hash), Version 4 (random, most common), and Version 5 (name-based, uses SHA-1 hash). Additionally, the 'Nil UUID' (all zeros) is a special reserved value. Version 4 is the most widely used in modern web development.
Is a UUID guaranteed to be unique?
UUIDs are designed to be 'practically unique' rather than 'absolutely unique'. For UUID v4 (random), the probability of collision is approximately 1 in 2^122, which is astronomically small. To put this in perspective: you would need to generate 1 billion UUIDs per second for about 100 years to have a 50% chance of a single collision. For all practical purposes, UUIDs can be treated as unique.
How can I check if a UUID is valid?
You can use our free online UUID validator tool to instantly check any UUID string. Simply paste the UUID into the input field and click Validate. The tool checks the format (8-4-4-4-12 hex digits), version bits (must be 1-5), and variant bits (must be 8, 9, a, or b) according to RFC 4122. You can also validate UUIDs programmatically using regex or UUID parsing libraries in your preferred language.
What is the correct UUID format?
The canonical UUID format is 32 hexadecimal digits displayed in five groups separated by hyphens: xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx. 'M' indicates the UUID version (1-5), and 'N' indicates the variant (8, 9, a, or b for RFC 4122). Example: 550e8400-e29b-41d4-a716-446655440000. Hex digits can be uppercase or lowercase. Alternative representations include URN format (urn:uuid:...) and curly-brace-enclosed format.
When should I use UUIDs instead of auto-increment IDs?
Use UUIDs when you need globally unique identifiers across distributed systems, when merging data from multiple sources, when exposing IDs in URLs or APIs (for security through obscurity), or when offline clients need to generate IDs. Auto-increment IDs are better for simple single-database applications where sequential ordering is important and storage space is a concern.
Can I generate UUIDs online for free?
Yes! Our UUID validator tool includes a Generate button that creates cryptographically secure UUID v4 values using the browser's crypto.randomUUID() API. No data is sent to any server — UUIDs are generated entirely in your browser. You can generate as many as you need for free, with no registration required.
What is the probability of UUID collision?
For UUID v4 (random), the collision probability can be calculated using the birthday problem formula: p ≈ n²/(2×2^122), where n is the number of generated UUIDs. To have a 50% chance of collision, you would need to generate approximately 2.7×10^18 UUIDs. At a rate of 1 billion per second, this would take about 86 years. For all practical purposes, UUID v4 collisions do not happen.
Should I use UUID as a primary key in my database?
UUIDs as primary keys have pros and cons. Pros: globally unique, enables distributed ID generation, good for data merging. Cons: larger than integers (16 bytes vs 4-8 bytes), can cause index fragmentation in B-tree indexes due to randomness, and are less human-readable. Consider using ULID or UUID v7 (time-ordered) for better database performance if your database supports them.
Is it safe to share UUIDs publicly?
UUID v4 is generally safe to share publicly as it contains no identifying information — just random bits. However, UUID v1 contains the MAC address of the generating machine and a timestamp, which could potentially be used for tracking. For public-facing use, always prefer UUID v4, which provides only randomness. Our tool uses crypto.randomUUID() for secure, private UUID generation.