UUID Version Detector
Instantly identify UUID version, variant, and structure from any UUID string. Free online UUID analysis tool.
Quick Test UUIDs:
UUID Version Reference Guide
Quick reference for all UUID versions defined in RFC 4122 and RFC 9562.
Time-Based
60-bit timestamp + 48-bit node ID (MAC address). Original UUID version from RFC 4122. Useful for legacy systems and temporal tracking.
Random
122 random bits. Most popular UUID version for general use. Provides excellent uniqueness with no embedded metadata or privacy concerns.
Unix Epoch Time-Ordered
48-bit Unix timestamp + random bits. Modern standard for database primary keys. Sortable by creation time for optimal B-tree index performance.
Custom
Vendor-specific custom implementation. Allows developers to define their own UUID generation scheme while maintaining format compatibility.
Related UUID Tools
Complete Guide to Detecting UUID Versions
A UUID version detector is a specialized developer tool that identifies which UUID version (v1 through v8) a given identifier belongs to. Understanding UUID versions is crucial for developers working with distributed systems, databases, and APIs, as each version uses a different generation method with distinct characteristics, advantages, and use cases. Our free online UUID version detector provides instant analysis of any UUID string, revealing its version, variant, and structural composition.
UUIDs (Universally Unique Identifiers) are 128-bit values standardized by RFC 4122 and updated in RFC 9562. The version information is encoded directly within the UUID structure, specifically in the first character (4 bits) of the third segment. By understanding how to read this version indicator, you can quickly determine how a UUID was generated and whether it's appropriate for your use case.
How to Manually Detect UUID Version
Detecting a UUID version manually is straightforward once you understand the structure. Consider this example UUID:
The UUID is divided into five segments:
- Segment 1: 550e8400 (8 characters)
- Segment 2: e29b (4 characters)
- Segment 3: 41d4 (4 characters) ← Version is here
- Segment 4: a716 (4 characters)
- Segment 5: 446655440000 (12 characters)
Look at the first character of the third segment. In this case, it's 4, indicating this is a UUID version 4 (random). This character will always be a hexadecimal digit from 1 to 8, corresponding to the UUID version.
Complete UUID Version List
UUID Version 1 (Time-Based + MAC Address)
UUID v1 generates identifiers using a 60-bit timestamp (representing 100-nanosecond intervals since October 15, 1582) combined with a 48-bit node identifier (traditionally the MAC address of the generating machine). This version was the first defined in RFC 4122 and provides both temporal and spatial uniqueness. The timestamp allows you to determine exactly when a UUID was generated, while the node ID identifies which machine created it.
UUID Version 2 (DCE Security)
UUID v2 is a variant of v1 designed for Distributed Computing Environment (DCE) security. It replaces some timestamp bits with a local domain identifier (POSIX UID or GID) instead of a MAC address. This version is rarely used in modern applications and has been largely deprecated.
UUID Version 3 (Name-Based MD5 Hash)
UUID v3 generates deterministic UUIDs by hashing a namespace identifier and name using the MD5 algorithm. The same name in the same namespace always produces the same UUID. This is useful for creating reproducible identifiers from existing data, such as generating UUIDs from URLs or file paths.
UUID Version 4 (Random)
UUID v4 is the most commonly used version. It generates identifiers using random or pseudo-random values for 122 of its 128 bits. The remaining bits indicate the version (4) and variant (RFC 4122). With 122 random bits, the probability of collision is approximately 1 in 2^122, making collisions practically impossible for most applications.
UUID Version 5 (Name-Based SHA-1 Hash)
UUID v5 is similar to v3 but uses the more secure SHA-1 hash algorithm instead of MD5. Like v3, it produces deterministic UUIDs from namespace and name inputs. SHA-1 provides better collision resistance than MD5, making v5 preferred over v3 for cryptographic applications.
UUID Version 6 (Reordered Timestamp)
UUID v6 is a modification of v1 that reorders the timestamp bits to be in network byte order. This simple change makes UUIDs sortable by creation time, improving database index performance. UUID v6 was introduced in the draft versions of RFC 9562 and is gaining adoption.
UUID Version 7 (Unix Epoch Time-Ordered)
UUID v7 is the modern standard for time-ordered UUIDs. It encodes a 48-bit Unix timestamp (milliseconds since January 1, 1970) in the first 48 bits, followed by random bits for uniqueness. This structure makes v7 UUIDs naturally sortable by creation time, which is ideal for database primary keys and B-tree index performance.
UUID Version 8 (Custom)
UUID v8 is reserved for vendor-specific or custom implementations. It allows developers to define their own UUID generation scheme while maintaining compatibility with the standard UUID format. The version bits are set to 8, but the internal structure can be customized.
How Our UUID Version Detector Works
Our UUID version detector performs several analysis steps:
- Format Validation: Checks that the input string matches the 8-4-4-4-12 hexadecimal pattern
- Character Verification: Confirms all characters are valid hexadecimal digits (0-9, a-f)
- Version Extraction: Reads the first character of the third segment to determine the version
- Variant Detection: Examines the first character of the fourth segment to identify the variant
- Structural Analysis: Breaks down the UUID into its component fields for detailed inspection
Detecting UUID Version Programmatically
You can detect UUID versions in code using simple string manipulation or regular expressions:
Common UUID Versions You'll Encounter
In practice, you'll encounter these UUID versions most frequently:
- UUID v4: Most common. Used by default in most programming languages and frameworks
- UUID v7: Increasingly popular for database primary keys due to sortability
- UUID v1: Found in legacy systems and certain distributed applications
- UUID v5: Used when deterministic UUIDs are needed from existing data
Why UUID Version Detection Matters
Understanding UUID versions is important for several reasons:
- Database Performance: Some versions (v7) are better for database indexes than others (v4)
- Privacy Concerns: v1 contains MAC addresses; v4 and v7 don't expose hardware info
- Deterministic Generation: v3 and v5 produce the same UUID from the same input
- Temporal Analysis: v1, v6, and v7 include timestamp information
- Compatibility: Ensure UUIDs meet system requirements
UUID Variant Detection
In addition to version detection, our tool also identifies the UUID variant. The variant is encoded in the first 1-3 bits of the fourth segment:
- RFC 4122/9562 (10xx): Standard UUID format used by most modern systems
- NCS Backward Compatible (0xxx): Legacy Apollo Network Computing System format
- Microsoft GUID (110x): Microsoft's COM/OLE implementation
- Reserved (111x): Reserved for future definition
Frequently Asked Questions
How do I detect UUID version? ↓
Look at the first character of the third group in the UUID string. This character indicates the version: 1 for time-based, 4 for random, 7 for Unix epoch time-ordered, and 8 for custom.
What are the different UUID versions? ↓
UUID versions include v1 (timestamp + MAC), v2 (DCE Security), v3 (MD5 name-based), v4 (random), v5 (SHA1 name-based), v6 (reordered timestamp), v7 (Unix epoch), and v8 (custom).
Can I detect UUID version without a tool? ↓
Yes, you can manually check the version by looking at the first character of the third segment. For example, '550e8400-e29b-41d4-a716' - the '4' in '41d4' indicates version 4.
What is the difference between UUID v4 and v7? ↓
UUID v4 uses random values for all 122 bits. UUID v7 encodes a Unix timestamp in the first 48 bits making it time-ordered and suitable for database indexes.
Which UUID version should I use? ↓
For most general purposes, use UUID v4. For database primary keys, use UUID v7 for better index performance. Use v5 when you need deterministic UUIDs from existing data.