UUID Parser & Decoder
What are UUIDs?
A UUID (Universally Unique Identifier), also known as a GUID (Globally Unique Identifier) in Microsoft contexts, is a 128-bit value used to uniquely identify information in computer systems. UUIDs are designed to be unique across space and time without requiring a central coordinating authority.
UUID Structure
A standard UUID is displayed as 32 hexadecimal digits in five groups separated by hyphens:
550e8400-e29b-41d4-a716-446655440000Format: 8-4-4-4-12 hexadecimal digits = 128 bits total
Common Use Cases
- •Database primary keys
- •Session identifiers
- •Transaction and request IDs
- •File and object identifiers
- •Distributed system coordination
UUID Versions Explained
Timestamp + MAC Address
Generated using current timestamp and the machine's MAC address. Sortable by creation time.
Random (Recommended)
Generated using cryptographically secure random numbers. Completely unpredictable and privacy-preserving.
Name-Based SHA-1
Deterministic UUID generated by hashing a namespace UUID and a name using SHA-1. Same input always produces the same UUID.
Unix Timestamp + Random (Modern)
Newest specification combining Unix timestamp with random data. Sortable by creation time without privacy concerns.
| Version | Method | Sortable | Deterministic | Privacy Safe |
|---|---|---|---|---|
| v1 | Timestamp + MAC | Yes | No | No |
| v4 | Random | No | No | Yes |
| v5 | Name + SHA-1 | No | Yes | Yes |
| v7 | Timestamp + Random | Yes | No | Yes |
UUID Best Practices
Do These
- ✓Use UUID v4 for general purposes: Best for session IDs, API keys, and general unique identifiers
- ✓Use UUID v7 for database keys: Better indexing performance due to time-based ordering
- ✓Store as binary in databases: Save space and improve performance by using BINARY(16) or native UUID types
- ✓Use UUID v5 for deterministic IDs: Perfect when you need consistent IDs from names or URLs
- ✓Validate UUIDs on input: Always verify UUID format before storing or processing
Avoid These
- ✗Don't use UUID v1 by default: May expose MAC addresses - use v7 for sortable IDs instead
- ✗Don't store as VARCHAR unnecessarily: Wastes 20+ bytes per UUID compared to binary storage
- ✗Don't generate UUIDs server-side only: Client-side generation reduces server load in distributed systems
- ✗Don't assume uniqueness without version info: Check UUID version when parsing to understand generation method
- ✗Don't use sequential IDs for security: Predictable IDs can leak information - use UUID v4 instead
Frequently Asked Questions
Find answers to common questions
Need Help with Your Development Infrastructure?
Our experts can help you implement best practices for unique identifiers, database design, distributed systems, and application security.