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.
Tips and Best Practices
- → UUID v4 is the safe default. Version 4 UUIDs are generated from random data, making them suitable for most use cases — database primary keys, session IDs, file names, and API identifiers.
- → UUIDs are practically unique. With 122 random bits, UUID v4 has a collision probability so low that you'd need to generate 2.71 × 10^18 UUIDs to have a 50% chance of a single duplicate. For all practical purposes, they're unique.
- → Consider ULIDs for sortable IDs. If you need IDs that sort chronologically (useful for database performance), consider ULIDs — they're timestamp-prefixed and lexicographically sortable while remaining unique.
- → Don't use UUIDs as security tokens. UUIDs (especially v1 and v4) are not designed to be unguessable secrets. For authentication tokens, API keys, or password reset links, use a cryptographically secure random generator instead.
Frequently Asked Questions
Built by Derek Giordano · Part of Ultimate Design Tools