What Is a UUID?
A UUID (Universally Unique Identifier), also known as GUID (Globally Unique Identifier), is a 128-bit value used to uniquely identify information in computer systems. A UUID looks like:
550e8400-e29b-41d4-a716-446655440000
It consists of 32 hexadecimal digits displayed in 5 groups separated by hyphens: 8-4-4-4-12.
UUID Versions Explained
| Version | Method | Use Case |
|---|---|---|
| v1 | Timestamp + MAC address | When you need time-sortable IDs (but exposes MAC) |
| v3 | MD5 hash of namespace + name | Deterministic IDs from names (not recommended) |
| v4 | Random | General purpose — most widely used |
| v5 | SHA-1 hash of namespace + name | Deterministic IDs when the same input should always produce the same UUID |
| v7 | Unix timestamp + random | Time-sortable random UUIDs — the new standard |
Why Use UUIDs Instead of Auto-Increment IDs?
- ✅ Globally unique — No coordination between database nodes required.
- ✅ Unpredictable — Users can't guess other records' IDs (v4).
- ✅ Distributed systems — Generate IDs client-side without a database round-trip.
- ✅ Merging databases — No ID conflicts when merging datasets.
- ⚠️ Larger size — 128-bit vs 32-bit integers means more storage and slower index scans.
How to Generate UUIDs Online
- Visit FavorTool UUID Generator.
- Select the UUID version (v4 for most use cases).
- Set the quantity — generate up to 1,000 UUIDs at once.
- Copy or download the generated UUIDs.
UUID Probability of Collision
UUID v4 is randomly generated with 122 bits of randomness. The probability of generating a duplicate UUID is astronomically small — you'd need to generate 2.71 quintillion UUIDs to have just a 50% chance of a collision. In practice, UUID v4 collisions are impossible to encounter.