UUID Generator & Decoder
Free UUID generator — create v1, v4, v5, v7 UUIDs instantly. Decode & validate any UUID. Batch generate up to 50. No signup, 100% browser-based.
What Is a UUID?
A UUID (Universally Unique Identifier) is a 128-bit identifier standardized by RFC 9562 (formerly RFC 4122). UUIDs are written as 32 hexadecimal digits in the canonical 8-4-4-4-12 format, such as `550e8400-e29b-41d4-a716-446655440000`. They are designed to be globally unique without requiring a central authority or coordination between systems.
There are five widely used UUID versions. Version 1 (v1) encodes the current timestamp and the generating machine's MAC address, making each UUID unique in both time and space. Version 3 (v3) and version 5 (v5) are deterministic — they hash a namespace and a name using MD5 or SHA-1 respectively, always producing the same UUID for the same inputs. Version 4 (v4) is the most common: it fills 122 bits with cryptographically secure random data, giving over 5.3 x 10^36 possible values. Version 7 (v7), introduced in RFC 9562, combines a Unix timestamp in milliseconds with random data, producing UUIDs that are both unique and naturally sortable by creation time.
UUIDs are essential in distributed systems, databases, APIs, and anywhere unique identifiers are needed without centralized coordination. They eliminate the risk of ID collisions across independent systems, making them ideal for microservices, event sourcing, and multi-tenant architectures.
This tool generates all UUID versions entirely in your browser using the Web Crypto API. No UUIDs are transmitted to any server, ensuring complete privacy. You can also decode and validate existing UUIDs to inspect their version, variant, and embedded data.
// Generate a UUID v4 using the Web Crypto API
const uuid = crypto.randomUUID();
console.log(uuid);
// → '550e8400-e29b-41d4-a716-446655440000'
// Manual v4 generation with crypto.getRandomValues()
function generateUUIDv4() {
const bytes = new Uint8Array(16);
crypto.getRandomValues(bytes);
bytes[6] = (bytes[6] & 0x0f) | 0x40; // version 4
bytes[8] = (bytes[8] & 0x3f) | 0x80; // variant 10
const hex = Array.from(bytes, b => b.toString(16).padStart(2, '0')).join('');
return `${hex.slice(0,8)}-${hex.slice(8,12)}-${hex.slice(12,16)}-${hex.slice(16,20)}-${hex.slice(20)}`;
} Key Features
UUID v7 Support (RFC 9562)
Generate the latest UUID v7 format with embedded Unix timestamps for time-ordered, database-friendly identifiers. One of the few online tools supporting the RFC 9562 standard.
UUID Decoder & Validator
Parse any UUID to reveal its version, variant, timestamp (v1/v7), clock sequence, and node information. Instantly validate whether a string is a correctly formatted UUID.
Multi-Version Support
Generate UUIDs in five versions — v1 (time-based), v3 (MD5), v4 (random), v5 (SHA-1), and v7 (time-ordered random) — all conforming to RFC 9562.
Batch Generation
Generate up to 50 unique UUIDs at once. Each UUID is independently generated with full cryptographic randomness or correct version-specific encoding.
Multiple Output Formats
Output UUIDs in standard lowercase, UPPERCASE, no hyphens, or braces {GUID} format — matching the exact format required by your system or framework.
Cryptographically Secure
Uses the Web Crypto API (crypto.getRandomValues()) for true random number generation — the same standard used by modern browsers and security tools.
100% Browser-Based
All UUIDs are generated locally in your browser. Nothing is sent to any server — your generated identifiers stay completely private.
UUID Version Comparison
Choose the right UUID version for your use case.
| Version | Basis | Sortable | Privacy | Best For |
|---|---|---|---|---|
| v1 | Timestamp + MAC address | By creation time | Exposes MAC & time | Legacy systems requiring time-based ordering |
| v4 | 122 bits cryptographic random | No | Fully anonymous | General purpose — most widely used version |
| v5 | SHA-1 hash of namespace + name | No | Deterministic, reproducible | Consistent IDs from known inputs (URLs, DNS) |
| v7 | Unix timestamp (ms) + random | By creation time | Exposes creation time only | Modern databases — sortable, index-friendly (RFC 9562) |
UUID vs Other ID Formats
ULID
26 chars, Crockford Base32Lexicographically sortable like UUID v7, but uses Crockford Base32 encoding (26 chars vs 36). UUID v7 is now the IETF-standardized alternative with broader tooling support.
nanoid
21 chars, URL-safe alphabetShorter and URL-safe, ideal when compactness matters. Not a formal standard — lacks native database types and cross-platform libraries that UUID has.
CUID2
Variable length, alphanumericDesigned for horizontal scaling with collision resistance. Less widely adopted than UUID; no native database support. Consider UUID v7 for standardized time-sorted IDs.
UUID Version Examples
UUID v4 (Random)
550e8400-e29b-41d4-a716-446655440000
The most commonly used version. 122 bits of cryptographic randomness provide over 5.3 x 10^36 possible values — suitable for virtually any use case where uniqueness is required without coordination.
UUID v7 (Time-ordered)
01906b5e-4a3e-7234-8f56-b8c12d4e5678
Combines a 48-bit Unix timestamp in milliseconds with random data. UUIDs sort chronologically, making them ideal for database primary keys where index locality matters. Recommended for new projects over v1 and v4.
UUID v1 (Time-based)
6ba7b810-9dad-11d1-80b4-00c04fd430c8
Encodes a 60-bit timestamp and the generating machine's 48-bit MAC address. Guarantees uniqueness in time and space but can leak hardware identity information. Superseded by v6/v7 in RFC 9562.
UUID v5 (SHA-1 Name-based)
886313e1-3b8a-5372-9b90-0c9aee199e5d
Deterministic UUID generated by hashing the DNS namespace with the name 'python.org' using SHA-1. The same namespace and name always produce the same UUID, making v5 ideal for reproducible identifiers.
How to Use
- 1
Select UUID Version
Choose from v1 (time-based), v3 (MD5 name-based), v4 (random), v5 (SHA-1 name-based), or v7 (time-ordered random). Each version serves a different purpose — v4 is the most common for general use.
- 2
Configure Options
For v3 and v5, select a namespace (DNS, URL, OID, X.500, or custom) and enter a name to hash. Set the quantity from 1 to 50 and choose an output format: standard lowercase, UPPERCASE, no hyphens, or braces {GUID}.
- 3
Generate UUIDs
Click the Generate button. Each UUID is created using the Web Crypto API (crypto.getRandomValues()) for cryptographic security. Version-specific fields like timestamps (v1/v7) and hashes (v3/v5) are correctly encoded.
- 4
Copy and Use
Click the Copy button next to any UUID to copy it to your clipboard, or use Copy All to grab every generated UUID at once. Switch to the Decode tab to analyze an existing UUID's version, variant, timestamp, and other embedded information.
Common Use Cases
- Database Primary Keys
- Use UUID v4 or v7 as unique primary keys without coordination between database nodes. UUID v7 is especially well-suited because its time-ordered property improves B-tree index performance.
- Distributed Systems
- Generate unique identifiers independently across microservices, message queues, and event sourcing systems. UUIDs eliminate the need for a centralized ID-generation service.
- API Development
- Create unique request IDs, correlation IDs, and idempotency keys for RESTful and GraphQL APIs. UUIDs make it easy to trace requests across distributed service boundaries.
- Session & Token Management
- Generate unique session identifiers and temporary tokens for authentication flows. UUIDs provide sufficient uniqueness to prevent session collisions across large user bases.
- Testing & Development
- Quickly generate test data, mock identifiers, and unique fixture IDs for automated testing. Batch generation makes it easy to populate development databases and test suites.
Technical Details
- UUID Structure
- A UUID is 128 bits (16 bytes) represented as 32 hexadecimal characters in the 8-4-4-4-12 format. Bits 48-51 (the 13th hex digit) encode the version number. Bits 64-65 encode the variant field, which identifies the UUID layout. The remaining bits carry version-specific payload: timestamp, random data, or hash output.
- Version Bits
- Bits 48-51 (the high nibble of the 7th byte) encode the UUID version: 0001 = v1 (time-based), 0011 = v3 (MD5 name-based), 0100 = v4 (random), 0101 = v5 (SHA-1 name-based), 0110 = v6 (reordered time), 0111 = v7 (Unix epoch time). These four bits are always set explicitly during generation.
- Variant Field
- Bits 64-65 (the two most significant bits of the 9th byte) define the variant. The pattern 10x indicates RFC 4122/9562 UUIDs (the vast majority). Pattern 110 indicates Microsoft GUIDs with mixed-endian byte order. Pattern 0xx indicates NCS backward-compatible UUIDs (legacy). Pattern 111 is reserved for future use.
- RFC 9562 Standard
- RFC 9562, published in May 2024, supersedes RFC 4122 as the definitive UUID specification. It formally introduces UUID versions 6, 7, and 8. Version 6 reorders v1 fields for sortability. Version 7 uses a 48-bit Unix timestamp in milliseconds plus random data, making it the recommended version for new time-based UUIDs. Version 8 provides a format for custom, implementation-specific UUIDs. RFC 9562 also formally deprecates v1 in favor of v6/v7.
Best Practices
- Choose the Right Version
- Use v4 for general-purpose unique identifiers where no ordering or determinism is needed. Use v7 for database primary keys — its time-ordered property delivers significantly better index performance. Use v5 when you need deterministic IDs derived from names (prefer v5 over v3 for stronger hashing).
- Use UUID v7 for Database Primary Keys
- UUID v7's time-ordered structure keeps B-tree inserts sequential, reducing index fragmentation by approximately 90% compared to random v4 UUIDs. This translates to faster writes, smaller indexes, and better cache utilization. Most modern databases (PostgreSQL 17+, MySQL 8.0+) have native UUID support optimized for this pattern.
- Never Use UUIDs as Security Tokens
- UUIDs are designed for uniqueness, not secrecy. UUID v1 leaks the generation timestamp and MAC address. UUID v4 has only 122 bits of entropy with a predictable structure. For security tokens, API keys, or session secrets, use a dedicated CSPRNG to generate 128 or 256 bits of pure random data without the UUID structure overhead.
- Validate Before Parsing
- Always validate UUID format with a regular expression before parsing or storing. Reject malformed inputs at system boundaries — API endpoints, form submissions, and database inputs. This prevents injection attacks, data corruption, and hard-to-debug errors from invalid identifiers propagating through your system.
Frequently Asked Questions
What is a UUID?
What are the differences between UUID versions?
When should I use UUID v4 vs v7?
What is the probability of UUID collision?
What is the difference between UUID and GUID?
Is UUID v4 cryptographically secure?
How to validate a UUID format?
Are UUIDs good database primary keys? (Performance, safety & best version)
What is a namespace UUID (v3/v5)?
What is the UUID nil value?
What is UUID v7 and why should I use it?
How to decode a UUID?
UUID vs ULID vs nanoid — which should I use?
Related Tools
View all tools →MD5 Hash Generator & File Checksum Tool
Security Tools
Generate MD5, SHA-256, SHA-1 & SHA-512 hashes online for free — no signup, 100% in-browser. Hash text or files instantly, verify checksums, compare hashes, one-click copy. Your data never leaves your device.
Random Password Generator
Security Tools
Generate strong random passwords instantly — free, no signup, 100% in your browser. Customize length & character types, batch generate up to 50. Strength meter with entropy analysis.
Number Base Converter — Binary, Hex, Decimal & Octal
Conversion Tools
Convert numbers between binary, hexadecimal, decimal, octal, and any custom base (2-36) instantly. Free, private, no sign-up — all processing happens in your browser.
Base64 Decoder & Encoder
Encoding & Formatting
Decode and encode Base64 online for free. Real-time conversion with full UTF-8 and emoji support. 100% private — runs in your browser. No signup needed.
Image Compressor
Conversion Tools
Reduce image size up to 80% — compress JPEG, PNG & WebP in your browser, no upload needed. Batch 20 images, adjust quality, compare before & after. Free & private.
JSON Formatter & Validator
Encoding & Formatting
Format, validate and beautify JSON instantly in your browser. Free online tool with syntax validation, error detection, minify and one-click copy. 100% private.