UUID Generator

Generate random v4 UUIDs -- cryptographically random, private, runs in your browser

Click Generate to create a UUID
UUIDs generated this session: 0

What Is a UUID?

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.

How to Generate UUIDs

  1. Click the Generate button to create a single random UUID v4
  2. The UUID appears in the display area -- click it or use the Copy button to copy it
  3. Choose a format from the dropdown: standard dashes, no dashes, uppercase, or lowercase
  4. For multiple UUIDs, set the count (1-100) and click Generate Bulk
  5. Click Copy All to copy the entire list of generated UUIDs

UUID Versions Explained

VersionMethodUse case
v1Timestamp + MAC addressTime-ordered, exposes hardware identity
v3MD5 hash of namespace + nameDeterministic, reproducible from same input
v4Random (this tool)General purpose, no information leakage
v5SHA-1 hash of namespace + nameDeterministic, preferred over v3
v7Unix timestamp + randomTime-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.

UUID Collision Probability

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 vs GUID

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.

Frequently Asked Questions

Are UUIDs guaranteed unique?

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.

Can I use UUIDs as database primary keys?

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.

Why is the UUID version number always 4?

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.