v4: Cryptographically random — best for most use cases
History stored locally. Clear anytime.
Click Generate to create a UUID
UUID Decoder & Parser
Paste any UUID to instantly decode its version, variant, timestamp, and structure.
🔔 Stay Sharp
Get UUID tips, RFC updates, and dev tool news. No spam — just useful stuff.
✓ 2,400+ developers • Weekly • Unsubscribe anytime
What is a UUID?
A UUID (Universally Unique Identifier) is a 128-bit number used to uniquely identify information in computer systems. Unlike sequential IDs, UUIDs can be generated independently without coordination, making them perfect for distributed systems, databases, and APIs.
UUIDs are standardized by RFC 9562 (formerly RFC 4122) and are represented as 32 hexadecimal digits in 5 groups separated by hyphens:
xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx
Where M indicates the UUID version and N indicates the variant.
UUID Versions Explained
UUID v4 (Random)
Generated using random numbers with 2^122 possible combinations — the chance of collision is effectively zero for any practical application.
- Best for: Most applications, databases, APIs, session tokens
- Uniqueness: 2^122 possible values
UUID v1 (Timestamp-based)
Combines a timestamp, clock sequence, and node ID. Useful when you need to know when a UUID was created.
- Best for: Ordered IDs, audit trails
- Note: Contains timestamp information
UUID v3 (Name-based, MD5)
Generated by hashing a namespace + name using MD5. Deterministic — same inputs always produce the same UUID. Prefer v5 for new projects unless MD5 compatibility is required.
- Best for: Legacy systems requiring MD5-based UUIDs, backward compatibility
- Note: Uses MD5 (not cryptographically secure, but fine for UUID generation)
UUID v5 (Name-based, SHA-1)
Generated by hashing a namespace + name using SHA-1. Deterministic — same inputs always produce the same UUID.
- Best for: Consistent IDs from names, deduplication, content addressing
UUID v6 (Reordered Timestamp)
UUID v6 is a reordered version of v1, rearranging the timestamp bits for natural sortability. It uses the same 60-bit Gregorian timestamp as v1 but places the most significant bits first.
- Best for: Drop-in replacement for v1 when sortability matters
- Advantage: Lexicographically sortable while retaining v1 compatibility
UUID v7 (Unix Epoch, Sortable)
The newest version from RFC 9562. Encodes a Unix timestamp in milliseconds, making v7 UUIDs naturally sortable by creation time.
- Best for: Database primary keys, time-ordered events, distributed systems
- Advantage: Sortable + random — better than v1 for modern databases
Common UUID Formats
| Format | Example | Usage |
|---|---|---|
| Standard | 550e8400-e29b-41d4-a716-446655440000 |
Most common |
| Braces | {550e8400-e29b-41d4-a716-446655440000} |
Windows registry |
| URN | urn:uuid:550e8400-e29b-41d4-a716-446655440000 |
RFC 4122 URN |
| No hyphens | 550e8400e29b41d4a716446655440000 |
Compact storage |
📚 Latest Articles
View all →UUID Versions Explained: V1 vs V4 vs V7
Understand the differences between UUID v1, v4, v5, and v7. Learn which UUID version to use for databases, APIs, and distributed systems.
GUID vs UUID: What's the Difference?
GUID and UUID are often used interchangeably, but there are subtle differences. Learn what sets them apart and when each term applies.
UUID as Database Primary Key: Best Practices
Should you use UUIDs as primary keys? Learn the trade-offs, performance implications, and best practices for UUIDs in PostgreSQL, MySQL, and more.
How to Generate UUIDs in JavaScript, Python, Java, and Go
Code examples for generating UUIDs in every major programming language. Copy-paste snippets for JavaScript, Python, Java, Go, and more.
UUID Alternatives: ULID, NanoID, CUID, and Short UUID Compared
Compare UUID alternatives like ULID, NanoID, CUID, and short UUIDs. Learn when to use each and their trade-offs for unique ID generation.