IDForge
UUID Generator
Generate one UUID or a bulk batch — using the browser's cryptographic random source.
UUID versions and when to use each
Every UUID is 128 bits written as 32 hex characters in five dash-separated groups. The version digit sits at the start of the third group.
| Version | Generated from | Sortable? | Typical use |
|---|---|---|---|
| v1 | Timestamp plus MAC address | Partly | Legacy; leaks the host's MAC |
| v3 | MD5 hash of a namespace and name | No | Deterministic IDs, legacy |
| v4 | Random bits | No | The default choice for most IDs |
| v5 | SHA-1 hash of a namespace and name | No | Deterministic IDs from a stable name |
| v7 | Unix timestamp plus random bits | Yes | Database keys, where ordering helps |
v4 has 122 random bits, so collisions are not a practical concern. v7 is worth preferring for primary keys because time-ordered values keep B-tree indexes from fragmenting the way random v4 values do.
When to use v4
v4 UUIDs are random and unguessable — perfect for primary keys, session tokens, and anywhere you need a unique ID without coordination. Avoid for sortable IDs (use ULID or UUIDv7 instead).
Frequently asked questions
I need unique IDs for my database rows — should I use UUIDs?
UUID v4 works well as a primary key when you don't need sortability. For time-sortable IDs (useful for database indexing), consider ULID or UUID v7 instead. UUIDs are 128-bit, giving a collision probability near zero.
Can two UUIDs ever be the same?
Theoretically yes, but practically no. With 122 random bits in a v4 UUID, you'd need to generate about 2.7 billion UUIDs per second for 100 years to have a 50% chance of a single collision.
What's the difference between UUID v1 and v4?
UUID v1 encodes the timestamp and MAC address of the generating machine, making it sortable but potentially leaking device identity. UUID v4 is purely random — no timestamp, no hardware info, no ordering.
Related Developer calculators
Hash Generator (SHA-256)
SHA-256 hash any text, in your browser.
OpenPassword Strength Checker
Entropy-based strength estimate for any password.
OpenWord & Character Counter
Words, characters, sentences, paragraphs, reading time.
OpenLorem Ipsum Generator
Generate placeholder text — paragraphs, sentences, or words.
OpenLast updated: September 7, 2026