Canonical format
- Input
- crypto.randomUUID()
- Expected output
- 550e8400-e29b-41d4-a716-446655440000
Always 36 characters with 4 hyphens. The 13th hex is always "4" (version) and the 17th is "8", "9", "a" or "b" (RFC 4122 variant).
uuid v4 generator online
UUID v4 is the most popular format for unique identifiers: 122 bits of cryptographically secure randomness, defined by RFC 9562. It is ideal for record IDs, sessions, log correlation and any context where collisions must be practically impossible.
Always 36 characters with 4 hyphens. The 13th hex is always "4" (version) and the 17th is "8", "9", "a" or "b" (RFC 4122 variant).
PostgreSQL has a native UUID type; MySQL stores it as CHAR(36) or BINARY(16).
A UUID v4 is a 128-bit unique identifier generated with random bits, except for the 4 version bits and 2 variant bits, which leaves 122 truly random bits. The format is xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx, where the version digit is always 4 and y is 8, 9, a or b.
In theory, yes, but the probability is so low it is considered negligible for virtually all practical cases. You would need to generate one billion UUIDs per second for 85 years to have a 50% chance of a collision. For most systems, that is safe enough.
No. It helps explain the scenario and use the tool more safely, but real decisions should consider official sources, full context and qualified guidance when needed.