What is a UUID?
A UUID (Universally Unique Identifier) is a 128-bit identifier that's virtually guaranteed to be unique across all devices and time. Also known as GUIDs (Globally Unique Identifiers), they're essential for databases, APIs, and distributed systems.
Our generator creates Version 4 (random) UUIDs, the most commonly used type. Each UUID has a 1 in 5.3×10^36 chance of collision—effectively impossible.
UUID Versions
| Version | Based On | Use Case |
|---|---|---|
| v1 | Timestamp + MAC address | Time-based ordering |
| v3 | MD5 hash of namespace | Reproducible from input |
| v4 | Random | General purpose (most common) |
| v5 | SHA-1 hash of namespace | Like v3, more secure |
🔢 UUID Format
xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
The 4 indicates version 4. The y position is 8, 9, a, or b (variant bits).
Common Use Cases
Database Primary Keys
UUIDs make excellent primary keys because they can be generated on any client without coordinating with the database. No more auto-increment collisions in distributed systems!
API Resources
Exposing sequential IDs (1, 2, 3...) reveals business data and is a security risk. UUIDs hide the total count and order of resources.
Session Tokens
UUIDs are unguessable, making them suitable for session identifiers, temporary URLs, and access tokens.
Frequently Asked Questions
Can two UUIDs ever be the same?
Theoretically yes, practically no. You'd need to generate 1 billion UUIDs per second for 85 years to have a 50% chance of one collision. It's astronomically unlikely.
What's the difference between UUID and GUID?
They're the same thing! UUID is the standard term, while GUID is Microsoft's terminology. The format and function are identical.
Should I use dashes in UUIDs?
Standard format includes dashes for readability. Some databases store UUIDs without dashes to save space. Our tool lets you choose either format.
Implementation Examples
- JavaScript:
crypto.randomUUID() - Python:
uuid.uuid4() - SQL:
gen_random_uuid()(PostgreSQL) - CLI:
uuidgen(Linux/Mac)