UUID Generator
Generate random UUID v4 instantly. Create single or bulk UUIDs with one click.
What is a UUID?
UUID (Universally Unique Identifier) is a 128-bit identifier standard used to uniquely identify information in software. A UUID value is written as 32 hexadecimal digits in the format 8-4-4-4-12, such as 550e8400-e29b-41d4-a716-446655440000.
What is the difference between UUID v4 and v1?
UUID v1 is based on timestamp and MAC address, making it predictable and traceable. UUID v4 uses random or pseudo-random numbers, providing better privacy and no correlation between generated values.
What is the difference between UUID and GUID?
UUID and GUID refer to the same concept. GUID (Globally Unique Identifier) is Microsoft's term for the UUID standard defined in RFC 4122. They are functionally identical.
What does the UUID format 8-4-4-4-12 mean?
The format represents 5 groups of hexadecimal digits separated by hyphens: time_low (8), time_mid (4), time_hi_and_version (4), clock_seq (4), node (12). The version digit (4 in v4) appears in the third group.
Are generated UUIDs truly unique?
UUID v4 uses 122 bits of randomness. The probability of generating a duplicate is approximately 1 in 2.71 × 10¹⁸, making collisions practically impossible even with billions of UUIDs generated.
Can UUIDs be used as database primary keys?
Yes, UUIDs are widely used as primary keys in databases. They allow distributed systems to generate unique identifiers without coordination. However, they may impact index performance compared to sequential integer keys.
Are UUIDs case sensitive?
No, UUIDs are case insensitive. Both uppercase and lowercase hexadecimal representations refer to the same UUID value. However, lowercase is the conventional format per RFC 4122.
Can UUIDs be sequential or sortable?
Standard UUID v4 is not sequential. If you need time-ordered UUIDs, consider UUID v7 (time-ordered with random data) or ULID, which combines a timestamp with randomness for sortability.
How are UUIDs used in URLs and APIs?
UUIDs are commonly used in REST API URLs to identify resources, such as /api/users/550e8400-e29b-41d4-a716-446655440000. They prevent enumeration attacks and work well in distributed systems.
How much storage does a UUID require?
A UUID is 128 bits (16 bytes) in binary form. As a string, it takes 36 characters (32 hex digits + 4 hyphens). In databases, use binary(16) for efficient storage instead of char(36).
Are UUIDs secure and unpredictable?
UUID v4 values are unpredictable when generated with a cryptographically secure random number generator. However, UUIDs are not designed for security tokens — use dedicated token generation for authentication purposes.
What is a nil UUID?
The nil UUID (00000000-0000-0000-0000-000000000000) is a special UUID with all bits set to zero. It is sometimes used as a placeholder or to represent the absence of a valid UUID value.