Generate random v4 UUIDs -- cryptographically random, private, runs in your browser
Read more: UUID Generator
A UUID (Universally Unique Identifier) is a 128-bit identifier designed to be unique across all systems without requiring a central authority. The standard format is 32 hexadecimal digits displayed in five groups separated by hyphens: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
Version 4 UUIDs, which this tool generates, are created using random or pseudo-random numbers. Of the 128 bits, 6 are fixed (4 bits for the version number and 2 bits for the variant), leaving 122 bits of randomness. This gives 5.3 undecillion (5.3 x 10^36) possible v4 UUIDs -- enough that collisions are effectively impossible in any practical scenario.
| Version | Method | Use case |
|---|---|---|
| v1 | Timestamp + MAC address | Time-ordered, exposes hardware identity |
| v3 | MD5 hash of namespace + name | Deterministic, reproducible from same input |
| v4 | Random (this tool) | General purpose, no information leakage |
| v5 | SHA-1 hash of namespace + name | Deterministic, preferred over v3 |
| v7 | Unix timestamp + random | Time-ordered, database-friendly, newer standard |
This tool generates v4 UUIDs using your browser's crypto.randomUUID() API (or crypto.getRandomValues() as fallback), ensuring cryptographic-quality randomness.
A v4 UUID has 122 random bits, yielding 2^122 (about 5.3 x 10^36) possible values. To put this in perspective: if you generated one billion UUIDs per second, it would take approximately 109 billion years to have a 50% probability of a single collision. For all practical purposes, v4 UUIDs are unique.
The probability of collision when generating N UUIDs is approximately N^2 / (2 x 2^122). For a million UUIDs, the collision probability is about 10^-25 -- far less likely than being struck by a meteorite.
UUID and GUID are the same thing. UUID (Universally Unique Identifier) is the term defined in RFC 4122 and used by most platforms. GUID (Globally Unique Identifier) is the term Microsoft uses in Windows, .NET, and COM. The format, structure, and generation algorithms are identical. If you see a GUID in C# code, it is the same 128-bit identifier that other platforms call a UUID.
Statistically yes, but mathematically no. Since v4 UUIDs are random, there is a theoretical possibility of collision -- but the probability is so low (roughly 1 in 2^61 for a pair) that it is not a practical concern. No real-world system has ever had an accidental UUID v4 collision.
Yes, and many distributed systems do. The main trade-off is performance: random v4 UUIDs cause B-tree index fragmentation because inserts scatter across the index rather than appending to the end. If write performance matters, consider v7 UUIDs (time-ordered) or alternatives like ULID or CUID that are both unique and sortable by creation time.
The 13th hex digit of a UUID indicates the version. For v4 UUIDs, this digit is always 4. Similarly, the 17th hex digit starts with 8, 9, a, or b to indicate the RFC 4122 variant. These fixed bits are why v4 UUIDs have 122 bits of randomness instead of 128.