UUID Generator
Free online UUID/GUID generator. Generate UUID v1, v4, and v5 (Nil UUID) instantly. Bulk generation, copy to clipboard, and download as file. Perfect for developers needing unique identifiers.
UUID Generator - Generate Unique Identifiers Online
A powerful UUID/GUID generator that creates universally unique identifiers in multiple versions. Generate single or bulk UUIDs instantly with customizable formatting options. Perfect for database primary keys, session IDs, file names, and any scenario requiring unique identifiers.
What is a UUID?
UUID (Universally Unique Identifier), also known as GUID (Globally Unique Identifier), is a 128-bit number used to uniquely identify information in computer systems. UUIDs are designed to be unique across space and time without requiring a central authority.
Format: 8-4-4-4-12 hexadecimal digits
Example: 550e8400-e29b-41d4-a716-446655440000
UUIDs are commonly used for:
- Database primary keys
- Session identifiers
- File and resource identifiers
- Distributed system coordination
- API request IDs
- Message IDs in queues
What are the different UUID versions?
UUID Version 1 (Timestamp-based):
- Generated using current timestamp and MAC address
- Can reveal the time and location of creation
- Not truly random - sequential
- Example: 6ba7b810-9dad-11d1-80b4-00c04fd430c8
UUID Version 4 (Random):
- Generated using random or pseudo-random numbers
- Most commonly used version
- 122 random bits (6 bits used for version/variant)
- Extremely low collision probability
- Example: 550e8400-e29b-41d4-a716-446655440000
UUID Version 5 (Name-based SHA-1):
- Generated by hashing a namespace and name
- Deterministic - same input produces same UUID
- Useful for generating consistent IDs
- Example: 886313e1-3b8a-5372-9b90-0c9aee199e5d
Nil UUID:
- All zeros: 00000000-0000-0000-0000-000000000000
- Represents absence of UUID
- Used as default/null value
Which UUID version should I use?
Version 4 (Random) - Most Common:
- Use for: Database IDs, session tokens, general purpose
- Pros: Truly random, no privacy concerns, widely supported
- Cons: Not sortable by creation time
Version 1 (Timestamp):
- Use for: When you need time-ordered IDs
- Pros: Sortable, contains timestamp
- Cons: Reveals MAC address (privacy concern), not truly random
Version 5 (Name-based):
- Use for: When you need deterministic UUIDs
- Pros: Same input = same UUID, reproducible
- Cons: Requires namespace UUID
Nil UUID:
- Use for: Default values, null checks, placeholder
Recommendation: Use Version 4 for most cases unless you have specific requirements.
How unique are UUIDs?
UUIDs are extremely unique:
UUID v4 Statistics:
- Total possible UUIDs: 2^122 ≈ 5.3 × 10^36
- That's 5.3 undecillion possible values
- Collision probability is virtually zero
To put in perspective:
- Generating 1 billion UUIDs per second
- For 85 years
- Probability of collision: 50% only after 2.71 quintillion UUIDs
Practical meaning:
- You can safely generate UUIDs without checking for duplicates
- Collision in real-world usage is astronomically unlikely
- No central coordination needed
However:
- Poor random number generators can increase collision risk
- Use cryptographically secure random sources
- This tool uses browser's crypto.getRandomValues() for true randomness
What's the difference between UUID and GUID?
UUID and GUID are essentially the same thing:
UUID (Universally Unique Identifier):
- OSF (Open Software Foundation) term
- RFC 4122 standard
- Used in Unix/Linux, web standards, cross-platform
GUID (Globally Unique Identifier):
- Microsoft term
- Used in Windows, .NET, COM
- Exactly the same format and structure
The difference is purely terminology:
- UUID is the official RFC standard term
- GUID is Microsoft's marketing name
- Both refer to the same 128-bit identifier
- Format and generation algorithms are identical
Modern usage: "UUID" is more common in web development and cross-platform contexts.
Can I use UUIDs as database primary keys?
Yes, but consider the tradeoffs:
Advantages:
- ✓ Globally unique (no coordination needed)
- ✓ Can generate client-side
- ✓ No sequence conflicts in distributed systems
- ✓ Merge databases without ID conflicts
- ✓ Hide sequential information (security)
- ✓ Generate before inserting to DB
Disadvantages:
- ✗ Larger storage (16 bytes vs 4-8 bytes for integers)
- ✗ Slower indexing and joins
- ✗ Random UUIDs (v4) hurt index performance
- ✗ Not human-friendly
- ✗ Can't infer creation order (except v1)
Best practices:
- Use UUID v1 if you need time-ordering
- Use UUID v4 for distributed systems
- Consider ULID or KSUID for sortable UUIDs
- Use binary(16) storage in MySQL for efficiency
- Add regular integer index for sorting if needed
Many modern systems (PostgreSQL, MongoDB, Cassandra) handle UUIDs efficiently.
How do I format UUIDs?
UUIDs can be formatted in different ways:
Standard (with hyphens):
550e8400-e29b-41d4-a716-446655440000
Without hyphens:
550e8400e29b41d4a716446655440000
Uppercase:
550E8400-E29B-41D4-A716-446655440000
With braces (Microsoft style):
{550e8400-e29b-41d4-a716-446655440000}
URN format:
urn:uuid:550e8400-e29b-41d4-a716-446655440000
This generator lets you choose:
- Uppercase or lowercase
- With or without hyphens
- With or without braces
Most systems accept any format, but lowercase with hyphens is the standard.
Key Features
- Generate UUID v1 (timestamp-based)
- Generate UUID v4 (random - most common)
- Generate UUID v5 (name-based SHA-1)
- Nil UUID (all zeros)
- Bulk generation (1-100 UUIDs at once)
- Uppercase/lowercase formatting
- Include/exclude hyphens
- Include/exclude braces { }
- Copy all UUIDs to clipboard
- Download as text file
- 100% client-side - cryptographically secure random
- No server communication
- Works offline
- Dark mode support
- Mobile-friendly