UUID Generator
Generate UUID v4 identifiers instantly. Runs in your browser using crypto.randomUUID() — nothing is sent to any server.
10661aeb-2148-4d18-925b-796d2180f0dcUUID Validator
Need more developer tools?
Check out the full OGPix toolkit — OG image generator, Base64 encoder, password generator, and more. All free.
Browse All Tools →What Is a UUID?
A UUID (Universally Unique Identifier), also known as a GUID (Globally Unique Identifier), is a 128-bit identifier that is unique across both space and time. UUIDs are commonly used as database primary keys, API identifiers, session tokens, correlation IDs in distributed systems, and anywhere a unique identifier is needed without a central authority.
UUID v4 Explained
UUID version 4 is generated using random or pseudo-random numbers. Of the 128 bits, 6 bits are fixed (4 bits for the version and 2 bits for the variant), leaving 122 bits of randomness. This gives approximately 5.3 × 1036 possible UUIDs, making collisions virtually impossible. This tool uses the browser's crypto.randomUUID() API for cryptographically secure generation.
UUID Format
The standard UUID format is xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx, where x is any hexadecimal digit and y is one of 8, 9, a, or b. The "4" indicates version 4. UUIDs can be represented with or without hyphens and in upper or lowercase.
Frequently Asked Questions
Can two UUIDs be the same?
Theoretically yes, but practically no. With 122 bits of randomness, you would need to generate about 2.7 × 1018 UUIDs to have a 50% chance of a single collision. For all practical purposes, UUID v4 values are unique.
UUID vs GUID — what's the difference?
They are effectively the same thing. UUID is the standard term used in RFC 4122, while GUID is the term commonly used in Microsoft ecosystems. Both refer to 128-bit unique identifiers.
Should I use UUIDs as database primary keys?
UUIDs work well as primary keys when you need globally unique IDs without coordination (e.g., distributed systems, client-side ID generation). However, they are larger than auto-increment integers (16 bytes vs. 4-8 bytes) and random UUIDs can cause index fragmentation. Consider ULIDs or UUID v7 if ordering matters.