UUID Generator
Generate cryptographically random UUID v4 identifiers. Generate 1 to 100 at once — copy individually or download as a text file.
What is a UUID?
A UUID (Universally Unique Identifier), also called a GUID(Globally Unique Identifier) in Microsoft contexts, is a 128-bit identifier formatted as 32 hexadecimal digits in five groups:
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
UUIDs are used everywhere in software to uniquely identify records, resources, sessions, and objects without coordination between systems. Because they are generated independently, two different systems can generate UUIDs simultaneously with no risk of collision.
UUID v4 Format
UUID v4 uses random bits with two reserved positions:
- The 13th character is always
4(version indicator) - The 17th character is always one of
8,9,a, orb(variant indicator) - All other 122 bits are random, giving ~5.3 × 10³⁶ possible values
Common Uses for UUIDs
- Database primary keys: Unique IDs without auto-increment sequences — safe in distributed or multi-tenant systems
- REST API resource IDs:
/users/550e8400-e29b-41d4-a716-446655440000 - Session tokens: Unique session IDs for web applications
- File names: Unique names for uploaded files to avoid collisions
- Message IDs: Unique identifiers for events in message queues
- Idempotency keys: Prevent duplicate API operations
UUID in Different Languages
- JavaScript:
crypto.randomUUID() - Python:
import uuid; uuid.uuid4() - Java:
UUID.randomUUID() - Go:
github.com/google/uuidpackage - PostgreSQL:
gen_random_uuid() - MySQL:
UUID()
Frequently Asked Questions
What is a UUID?
UUID stands for Universally Unique Identifier. It is a 128-bit label formatted as 32 hexadecimal characters in five groups separated by hyphens: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. UUIDs are used to uniquely identify records in databases, files, API resources, and distributed systems without a central authority.
What is UUID v4?
UUID v4 is generated using random or pseudo-random numbers. It is the most widely used UUID version for general-purpose unique identifiers. The format is: 8-4-4-4-12 hexadecimal characters, where the third group always starts with '4' and the fourth group starts with '8', '9', 'a', or 'b' to indicate version and variant.
Are UUID v4 values truly unique?
UUID v4 values have 122 bits of randomness, giving approximately 5.3 × 10^36 possible values. The probability of generating two identical UUIDs is astronomically small — you would need to generate 1 billion UUIDs per second for 85 years before a collision becomes likely. For all practical purposes, UUID v4 values are unique.
What is the difference between UUID and GUID?
GUID (Globally Unique Identifier) is Microsoft's name for UUID. They are the same format and specification. Windows and .NET documentation typically uses GUID; most other contexts use UUID. The two terms are interchangeable.
Is this UUID generator cryptographically secure?
Yes. UUIDs are generated using crypto.randomUUID(), which is part of the Web Crypto API and uses the operating system's cryptographically secure pseudorandom number generator (CSPRNG). This is the same source used by security-critical applications.
When should I use UUID v4 vs other UUID versions?
UUID v1 is time-based and exposes the MAC address (privacy concern). UUID v3 and v5 are name-based (deterministic). UUID v4 is random and the most common choice for new applications. UUID v7 (newer standard) is time-ordered random — better for database primary keys as it reduces index fragmentation.