What is UUID Generator?
UUID Generator — A UUID Generator is a free tool that creates universally unique identifiers (UUIDs) in standard formats for use as database keys, session tokens, and resource identifiers.
Loading your tools...
Generate universally unique identifiers (UUIDs) in all standard versions. UUID v4 (cryptographically random), v1 (timestamp + MAC), v7 (sortable timestamp, RFC 9562), and v3/v5 (namespace-based deterministic). Also known as GUIDs. Standard 128-bit format: 8-4-4-4-12 hex characters. Bulk generation supported for database seeding and test fixtures.
UUID Generator: Click generate to create a new UUID instantly. Choose between UUID v4 (random) or v1 (timestamp-based). Copy the result and use it in your code, database, or configuration. Bulk generation is supported.
Loading Tool...
UUID Generator — A UUID Generator is a free tool that creates universally unique identifiers (UUIDs) in standard formats for use as database keys, session tokens, and resource identifiers.
Select the UUID version — v4 for random IDs, v7 for sortable database keys, v3/v5 for deterministic IDs.
For namespace versions (v3/v5), enter the namespace UUID and name string.
Click Generate to create one UUID, or use bulk generation for multiple values.
Copy the UUID in standard format (8-4-4-4-12) for use in your database, API, or code.
Database primary keys for PostgreSQL UUID columns and MongoDB _id fields
API resource identifiers for REST and GraphQL endpoints
Distributed system correlation IDs for request tracing across microservices
Test fixture and seed data generation for development and QA environments
| Version | Source | Sortable? | Best for |
|---|---|---|---|
| v1 | Timestamp + MAC address | Partially | Legacy systems (reveals MAC + time — privacy concern) |
| v3 | MD5(namespace + name) | No | Deterministic IDs from URLs / DNS (legacy — prefer v5) |
| v4 | 122 bits CSPRNG | No | General purpose (most common today) |
| v5 | SHA-1(namespace + name) | No | Deterministic IDs from known inputs (email → user UUID) |
| v6 | Reordered v1 timestamp | Yes | Time-sortable replacement for v1 (rarely used) |
| v7 | Unix-ms timestamp + 74 random bits | Yes | Database primary keys (RFC 9562, current best practice) |
UUID v8 is also defined in RFC 9562 (May 2024) as a customizable variant for application-specific schemes (e.g., embedding a tenant ID + timestamp + random). v8 is rarely needed unless you have a specific use case the others don't serve.
The B-tree page-split problem: when you use random UUID v4 as a primary key, every INSERT places the row at a random position in the B-tree index. This causes page splits — the database has to rearrange index nodes to make room, dirty more cache pages, and write more random I/O. Result: 20–40% lower INSERT throughput, larger index size, worse cache locality. UUID v7 fixes this: the first 48 bits are a Unix millisecond timestamp, so new UUIDs always sort after previous ones. INSERTs become sequential, B-tree splits drop to zero, index size shrinks, and performance approaches that of auto-incrementing integer keys — while keeping all the UUID benefits (globally unique, no central coordination, leak-resistant).
When to still use v4: distributed system correlation IDs, security tokens (you want max randomness, not sortability), short-lived session IDs.
550e8400-e29b-41d4-a716-446655440000 (36 chars including 4 dashes)550e8400e29b41d4a716446655440000 (32 hex chars — compact for URLs){550e8400-e29b-41d4-a716-446655440000} (used in Microsoft / Windows APIs)550E8400-E29B-41D4-A716-446655440000 (rare; lowercase is the RFC 4122 default)urn:uuid:550e8400-e29b-41d4-a716-446655440000 (RFC 4122 URN namespace)VQ6EAOKbQdSnFkRmVUQAAA (22 chars, 128 bits encoded as Base64URL)All formats are equivalent — they encode the same 128 bits. Choose based on the system you're feeding the UUID into.
v3 and v5 are deterministic — given the same namespace UUID and name string, they always produce the same UUID. The namespace is itself a UUID that groups related names. RFC 4122 defines four standard namespaces:
6ba7b810-9dad-11d1-80b4-00c04fd430c8 — for hostnames6ba7b811-9dad-11d1-80b4-00c04fd430c8 — for URLs6ba7b812-9dad-11d1-80b4-00c04fd430c8 — for ISO OIDs6ba7b814-9dad-11d1-80b4-00c04fd430c8 — for X.500 namesUse case: generate a stable user UUID from an email address by hashing "URL namespace + email". Even if your database is recreated, the same email produces the same UUID. Prefer v5 (SHA-1) over v3 (MD5) — SHA-1's collision weakness doesn't matter for UUID derivation, but you avoid using a fully-broken hash.
GUID (Globally Unique Identifier) is Microsoft's term for the same 128-bit identifier format used in UUIDs. Windows APIs, .NET (Guid.NewGuid()), SQL Server (uniqueidentifier), and COM all use the GUID terminology. They are byte-for-byte the same. The only difference: Microsoft historically used the "Variant 2" bit ordering in some older APIs (rare in modern systems), and GUIDs are often displayed wrapped in curly braces. This tool outputs RFC 4122 / RFC 9562 compliant UUIDs that work identically as GUIDs in any Microsoft system.
Picking advice: use UUID v7 for new database primary keys (standard, sortable, universal support). Use UUID v4 for security tokens. Use ULID if you need shorter, more readable identifiers and your stack supports it.