How to use the UUID Generator
- Choose the Quantity of UUIDs you need (from 1 up to 500 in a single click).
- Select between Lowercase (standard Unix/Linux) or Uppercase (Windows GUID) formatting.
- Toggle hyphens on or off, or wrap entries in curly braces or quotes for JSON/SQL insertion.
- Click GENERATE UUIDs to refresh values with 122 bits of cryptographic entropy.
- Click Copy to Clipboard or Download .txt to export your generated identifiers.
What is a UUID (Universally Unique Identifier)?
A Universally Unique Identifier (UUID), also referred to by Microsoft systems as a Globally Unique Identifier (GUID), is a 128-bit label standardized by the Internet Engineering Task Force (IETF) in RFC 4122. In software engineering and database architecture, UUIDs serve as primary keys that are guaranteed to be unique across all devices, servers, and networks without requiring a centralized registration authority or coordinating database server.
When printed in standard human-readable text, a UUID is represented as 32 hexadecimal digits displayed in five hyphenated groups separated by the 8-4-4-4-12 pattern:
Anatomy of a Version 4 UUID
While UUID specifications define multiple versions (Version 1 is timestamp-based, Version 3 and 5 are MD5/SHA-1 namespace hashes), Version 4 (UUIDv4) is by far the most ubiquitous because it is generated entirely from pseudo-random or cryptographically random bits:
- 122 Bits of Pure Entropy: Out of the 128 total bits, 6 bits are fixed to define the version and variant. The remaining 122 bits are completely random.
- The Version Nibble (M): In the third group (
-4xxx-), the first character is always a literal4, identifying it as a Version 4 UUID. - The Variant Nibble (N): In the fourth group (
-Nxxx-), the first character is restricted to8,9,a, orb, signifying the RFC 4122 standard layout (binary10xx).
The Astronomical Mathematics of Collision Probability
The total number of possible UUIDv4 combinations is 2122, which equals approximately 5.3 × 1036 (5.3 undecillion possibilities). To put this incomprehensible number in perspective:
| UUIDs Generated | Mathematical Collision Probability | Real-World Comparison |
|---|---|---|
| 1 Billion UUIDs | ~1 in 10,000,000,000,000,000,000 | Less than the odds of getting hit by a meteorite |
| 100 Trillion UUIDs | ~1 in 1,000,000,000 | One in a billion chance |
| 1 Billion/sec for 100 Years | ~1 in 1,000,000,000 | Virtually impossible |
Because collision odds are effectively zero, distributed microservice architectures can generate primary database keys locally across thousands of decoupled servers without checking for duplication.
UUIDv4 vs. Auto-Incrementing Database IDs
Historically, relational databases like MySQL and PostgreSQL used sequential auto-incrementing integer IDs (1, 2, 3...). While simple, sequential IDs present severe security and scaling flaws:
- Information Scraping Vulnerability: If a customer accesses invoice
/invoice/1004, they immediately know you have only had 1,004 invoices, and can iterate the URL to scrape competing customer data. UUIDs (/invoice/7c9e6679-7425-40de-944b-e07fc1f90ae7) are impossible to guess. - Multi-Master Sharding: With auto-incrementing IDs, two distributed database shards cannot insert rows independently without generating identical IDs. With UUIDs, sharded clusters generate globally distinct rows with zero communication latency.
Frequently asked questions
What is the difference between a UUID and a GUID?
How many bits are in a UUID v4?
Can two generated UUIDs ever collide?
Should I use uppercase or lowercase UUIDs?
Are UUIDs good for database primary keys?
Are these UUIDs generated using secure randomness?
Last reviewed November 2026. Results are estimates for information only — see our disclaimer.