UUID Generator
Generate UUIDs (Universally Unique Identifiers) online
Generate UUID v1, v4, v5, and NIL UUIDs instantly. Customize format with uppercase and dash removal options.
Quick Generate
Configuration
UUID Version
Quantity (max 1000)
Generated UUID
What is UUID Generator?
UUID Generator is a free online tool for generating UUIDs (Universally Unique Identifiers). Also known as GUIDs (Globally Unique Identifiers), UUIDs are 128-bit numbers used to uniquely identify information in computer systems without requiring a central authority.
This tool supports multiple UUID versions (v1, v4, v5) and allows you to customize the format with options for uppercase conversion and dash removal. Whether you need a single UUID or bulk generation of thousands, this tool makes it quick and easy.
What is a UUID?
A UUID (Universally Unique Identifier) is a 128-bit label used for information identification. When generated according to standard methods, UUIDs are for practical purposes unique, without requiring a central registration authority.
Standard UUID Format
A UUID is typically displayed as 32 hexadecimal digits separated by hyphens:
123e4567-e89b-12d3-a456-426614174000Format: xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx
Where:
xis any hexadecimal digit (0-9, a-f)Mindicates the UUID version (1, 4, 5, etc.)Nindicates the UUID variant
How to use UUID Generator?
Quick Generate
The fastest way to generate a UUID:
-
Click one of the Quick Generate buttons:
- UUID v1 - Timestamp-based UUID
- UUID v4 - Random UUID (most common)
- NIL UUID - Special all-zeros UUID
-
The UUID appears instantly in the output area.
-
Click Copy to copy to clipboard.
Custom Generation
For more control over UUID generation:
-
Select UUID Version from dropdown:
- Version 1: Timestamp-based with MAC address
- Version 4: Randomly generated (recommended)
- Version 5: Name-based using SHA-1 hash
- NIL UUID: All zeros (00000000-0000-0000-0000-000000000000)
-
Set Quantity (1-1000) for bulk generation.
-
For UUID v5, provide:
- Namespace UUID: The namespace identifier
- Name: The name to hash
-
Choose formatting options:
- Uppercase: Convert to uppercase letters
- Remove dashes: Remove hyphens from UUID
-
Click Generate UUIDs button.
-
Use Copy to copy all generated UUIDs.
Features
- Multiple UUID versions - v1, v4, v5, and NIL UUID support
- Quick generation - One-click generation for common use cases
- Bulk generation - Generate up to 1000 UUIDs at once
- Custom formatting - Uppercase and dash removal options
- UUID v5 support - Name-based generation with custom namespace
- Error handling - Clear validation and error messages
- Instant copy - Easy clipboard copy functionality
- Browser-based - No server required, completely private
UUID Versions Explained
UUID Version 1 (Timestamp-based)
Generated from: Current timestamp + MAC address + random component
Format: xxxxxxxx-xxxx-1xxx-xxxx-xxxxxxxxxxxx
Example:
6c84fb90-12c4-11e1-840d-7b25c5ee775aUse cases:
- When temporal ordering is important
- Database primary keys with chronological sorting
- Distributed systems requiring time-based coordination
Characteristics:
- Predictable sequence over time
- Can reveal MAC address and timestamp
- Guaranteed unique across space and time
UUID Version 4 (Random)
Generated from: Random or pseudo-random numbers
Format: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
Example:
550e8400-e29b-41d4-a716-446655440000Use cases:
- General-purpose unique identifiers
- Session IDs
- Transaction IDs
- Object identifiers
- Most common choice for new projects
Characteristics:
- Completely random
- No information leakage
- Extremely low collision probability (1 in 2^122)
UUID Version 5 (Name-based SHA-1)
Generated from: SHA-1 hash of namespace + name
Format: xxxxxxxx-xxxx-5xxx-yxxx-xxxxxxxxxxxx
Example:
886313e1-3b8a-5372-9b90-0c9aee199e5dUse cases:
- Deterministic UUID generation
- Same input always produces same UUID
- URL namespaces
- DNS namespaces
- Content-addressed storage
Characteristics:
- Reproducible
- Name-based generation
- Namespace isolation
- Collision-resistant
NIL UUID
Value: All zeros
Format: 00000000-0000-0000-0000-000000000000
Use cases:
- Default/placeholder value
- Null object pattern
- Initialization value
Common Use Cases
1. Database Primary Keys
Use UUIDs as primary keys for distributed databases:
CREATE TABLE users (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
username VARCHAR(50),
email VARCHAR(100)
);Benefits:
- No central ID generator needed
- Merge databases without conflicts
- Globally unique across all systems
2. API Request IDs
Track API requests with unique identifiers:
const requestId = '550e8400-e29b-41d4-a716-446655440000';
logger.info(`Request ${requestId} started`);3. File Names
Generate unique file names:
document-6c84fb90-12c4-11e1-840d-7b25c5ee775a.pdf
image-550e8400-e29b-41d4-a716-446655440000.jpg4. Session Management
Create unique session identifiers:
const sessionId = generateUUID();
sessionStorage.setItem('sessionId', sessionId);5. Microservices Communication
Trace requests across microservices:
X-Request-ID: 6c84fb90-12c4-11e1-840d-7b25c5ee775a
X-Correlation-ID: 550e8400-e29b-41d4-a716-4466554400006. Distributed Systems
Coordinate across distributed systems without conflicts:
const nodeId = '6c84fb90-12c4-11e1-840d-7b25c5ee775a';
const eventId = '550e8400-e29b-41d4-a716-446655440000';Formatting Options
Standard Format
550e8400-e29b-41d4-a716-446655440000Uppercase
550E8400-E29B-41D4-A716-446655440000Without Dashes
550e8400e29b41d4a716446655440000Uppercase Without Dashes
550E8400E29B41D4A716446655440000UUID Best Practices
Choosing the Right Version
Use UUID v4 when:
- You need maximum randomness
- Privacy is important
- You don't need reproducibility
- General-purpose identifiers
Use UUID v1 when:
- Temporal ordering matters
- You need chronological sorting
- Working with legacy systems
- Time-based coordination needed
Use UUID v5 when:
- You need deterministic generation
- Same input should produce same UUID
- Content-addressed systems
- URL/DNS namespaces
Storage Considerations
Binary vs String Storage:
Binary (16 bytes):
BINARY(16) -- MySQL
UUID -- PostgreSQLString (36 bytes with dashes):
CHAR(36) -- MySQL
VARCHAR(36) -- PostgreSQLRecommendation: Use native UUID type or binary storage for efficiency.
Performance Tips
-
Indexing: UUIDs as primary keys may cause index fragmentation. Consider:
- Using UUID v1 for better sequential ordering
- Adding separate sequential ID for ordering
- Using time-based prefixes
-
Storage: Store UUIDs in binary format to save space and improve performance
-
Generation: Generate UUIDs client-side to reduce server load
Security Considerations
UUID v1 Concerns:
- Exposes MAC address
- Reveals generation timestamp
- Predictable sequence
UUID v4 Security:
- Use cryptographically secure random number generator
- Suitable for security tokens
- No information leakage
UUID v5 Security:
- Deterministic but secure
- SHA-1 hash provides collision resistance
- Namespace isolation
Frequently Asked Questions
Q: Are UUIDs truly unique?
A: While not mathematically guaranteed, the probability of collision is so low (approximately 1 in 2^122 for UUID v4) that they are considered unique for practical purposes. You'd need to generate billions of UUIDs per second for thousands of years to have a 50% chance of collision.
Q: Which UUID version should I use?
A: For most applications, UUID v4 (random) is recommended. It's simple, secure, and has no information leakage. Use v1 if you need chronological ordering, or v5 if you need deterministic generation.
Q: Can I use UUIDs as database primary keys?
A: Yes, but be aware of potential index fragmentation issues. UUID v1 provides better sequential ordering for database indexes. Consider your database system's native UUID support and indexing strategies.
Q: How do I generate UUIDs in my code?
A: Most programming languages have UUID libraries:
- JavaScript:
crypto.randomUUID()oruuidpackage - Python:
uuidmodule - Java:
java.util.UUID - C#:
System.Guid.NewGuid() - PHP:
Ramsey\Uuid
Q: Are UUIDs case-sensitive?
A: No, UUIDs are case-insensitive. 550e8400-e29b-41d4-a716-446655440000 and 550E8400-E29B-41D4-A716-446655440000 represent the same UUID.
Q: Can I remove the dashes from UUIDs?
A: Yes, the dashes are just formatting. The UUID without dashes is equally valid and often used for shorter representations or URL-safe identifiers.
Q: What is the NIL UUID?
A: The NIL UUID (all zeros: 00000000-0000-0000-0000-000000000000) is a special UUID used to represent null or empty values in UUID-based systems.
UUID Standards
UUIDs are defined by:
- RFC 4122: A Universally Unique IDentifier (UUID) URN Namespace
- ISO/IEC 9834-8: Information technology standards
Privacy & Security
Your privacy is important to us:
- No data is sent to any server
- All UUID generation happens in your browser
- No cookies or tracking
- No account or login required
- Completely free to use
Related Tools
Comments