What Is a UUID?
A UUID (Universally Unique Identifier) is a 128-bit identifier designed to be globally unique without a central authority. Formatted as 32 hex digits in a 8-4-4-4-12 pattern (like 550e8400-e29b-41d4-a716-446655440000), UUIDs are used as database primary keys, session tokens, file names, API identifiers, and distributed system IDs.
UUID Versions
v1 — based on timestamp + MAC address. Sortable by time but reveals device identity. v4 — fully random. Most commonly used. No external state needed. v5 — deterministic hash from a namespace + name. Same inputs always produce the same UUID. v7 (newest) — timestamp-ordered random UUID. Sortable like v1 but without revealing device info.
How to Use This UUID Generator
- Click Generate — Click the generate button to create a new UUID instantly. Each one is cryptographically random and globally unique.
- Choose the version — Select UUID v4 (random, most common), v1 (timestamp-based), or other versions depending on your requirements.
- Copy the UUID — Click Copy to grab the UUID in standard format (8-4-4-4-12 hex digits separated by hyphens).
- Generate in bulk — Need multiple UUIDs? Set the quantity and generate a batch of unique identifiers at once.
Worked example: reading a version 4 UUID
This tool fills 16 bytes from the browser's cryptographic random generator (crypto.getRandomValues), then overwrites 6 bits exactly as RFC 9562 §5.4 prescribes: 4 bits for the version and 2 for the variant. That leaves 122 random bits. Take 2b248e95-304c-4e31-8fc2-faa3aaf56bae:
| Position | In the example | Meaning |
|---|---|---|
| Characters 1-12 and 18-36 (except the next two) | 2b248e95-304c … 8fc2-faa3aaf56bae | Random bits |
| Character 15 (first of the third group) | 4 | Version: always 4 for a random UUID |
| Character 20 (first of the fourth group) | 8 | Variant: always 8, 9, a or b (binary 10xx) |
So you can recognise a v4 UUID at a glance: a 4 at the start of the third group, and 8, 9, a or b at the start of the fourth. If either is different, the ID came from another version or a home-grown generator.
How unlikely is a duplicate? With 122 random bits there are 2122 (about 5.3 × 1036) possible values. The birthday bound puts a 50% chance of one collision at about 2.71 × 1018 UUIDs. For an ID that also sorts by creation time, which helps database index locality, RFC 9562 defines version 7: a 48-bit Unix timestamp in milliseconds followed by random bits. This tool generates v4 only.
Sources, checked October 11, 2026: RFC 9562 §5.4 (UUID Version 4) and §5.7 (Version 7); collision figure computed with the birthday approximation √(2 ln 2 · 2122).
Frequently Asked Questions
Built by Derek Giordano · Part of Ultimate Design Tools