UUID Generator
Collision chance is negligible
UUID v4 has 122 bits of randomness. To expect a single collision you'd need to generate 2.71×10¹⁸ UUIDs — roughly 139 years of generating 1 billion per second. Use them as primary keys, session IDs, and trace IDs without fear.
Related tools
UUID versions
- v1: timestamp + MAC address — often leaks hardware info, avoid in 2025
- v3, v5: name-based (MD5/SHA-1 of namespace + name) — deterministic, useful for content-addressed storage
- v4: pure random — most common, this generator's flavour
- v6, v7, v8 (2024 RFC 9562): timestamped for DB index-friendliness; v7 preferred for new apps
Frequently asked questions
UUID vs GUID — same thing?
Yes. GUID (Globally Unique IDentifier) is the Microsoft name; UUID (Universally Unique IDentifier) is the RFC 4122 standard. They have the same format and are interchangeable in practice.
Can I use UUIDs as primary key in my database?
Yes — PostgreSQL has a native uuid type, MySQL has UUID(). But sequential v4 UUIDs hurt InnoDB index performance due to random inserts. For MySQL/MariaDB use UUID_TO_BIN(id, 1) (time-ordered) or the newer UUIDv7 which has timestamp prefix.
Are these UUIDs valid offline?
Yes — UUIDs need no central authority. Anyone, anywhere, anytime can generate v4 UUIDs and trust they'll collide with some other UUID with probability smaller than winning a lottery every day for your entire life.
Why 36 characters?
32 hex digits + 4 dashes. The dashes are purely cosmetic, breaking the ID into 8-4-4-4-12 segments. Strip or uppercase freely — the underlying 16 bytes are the same.