Developer Architecture4 min read•Updated 2026-09-04
UUID v4 Guide: How Cryptographically Random Identifiers Work
Generate universally unique identifiers (UUID v4) for distributed databases, REST APIs, and microservices.
MX
MultiToolX Technical Team
Platform Engineering
Key Takeaways
- UUID v4 consists of 32 hexadecimal characters grouped into five sections: 8-4-4-4-12 (e.g. f47e2c91-8b05-4238-a8e7-d2e05b9b1d34).
- Contains 122 bits of pure randomness with 6 fixed version and variant bits.
- The probability of generating two duplicate UUID v4s is practically zero (one in 2.71 quintillion).
1. Anatomical Breakdown of a UUID v4
In a UUID like xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx:
- The '4' at the start of the 3rd group indicates Version 4 (randomly generated).
- The 'y' in the 4th group is constrained to binary 10xx (values 8, 9, a, or b), representing RFC 4122 variant compliance.
- The remaining 122 bits are filled using cryptographically secure random bytes.
Frequently Asked Questions
Can two UUID v4 values ever collide?
The chance of a collision is so infinitesimally small that you would have to generate 1 billion UUIDs every second for 85 years to have a 50% chance of a single collision.
Ready to use UUID Generator?
Fast, 100% private, client-side processing. No account, no watermark, completely free.