Random UUID Generator
What is a UUID?
A UUID (Universally Unique Identifier) is a 128-bit identifier standardized by RFC 4122. UUIDs are designed to be unique across space and time without requiring a central authority. The version 4 format used here relies entirely on random numbers, making each UUID practically impossible to predict or duplicate.
A UUID looks like 550e8400-e29b-41d4-a716-446655440000 — 32 hexadecimal digits separated by hyphens in a 8-4-4-4-12 pattern.
Use cases
- Primary keys for database records without sequential IDs
- Unique identifiers for distributed systems with no central coordinator
- Correlation IDs for tracking requests across microservices
- File and resource naming to avoid collisions
- Session tokens and temporary identifiers
- Test data generation for software development
UUID versions
There are several UUID versions, each with a different generation method:
| Version | Method | Notes |
|---|---|---|
| v1 | Timestamp + MAC address | Leaks creation time and hardware info |
| v3 | MD5 hash of name + namespace | Deterministic, same input = same UUID |
| v4 | Random | Most common, used by this generator |
| v5 | SHA-1 hash of name + namespace | Deterministic, preferred over v3 |
| v7 | Unix timestamp + random | Sortable, gaining adoption for databases |
How it works
- Your browser generates 16 cryptographically secure random bytes using the Web Crypto API
- Byte 6 is modified to set the version field to 4 (binary 0100)
- Byte 8 is modified to set the variant field to 1 (binary 10xx)
- The 16 bytes are encoded as 32 hexadecimal characters with hyphens in the 8-4-4-4-12 format
- The UUID exists only in your browser — nothing is sent to any server
Frequently asked questions
Will two UUIDs ever collide?
In practice, no. A v4 UUID has 122 random bits, producing over 5.3 × 10³⁶ possible values. You would need to generate about 2.7 × 10¹⁸ UUIDs (2.7 quintillion) before having a 50% chance of a single collision. For any real-world application, the probability is negligible.
Are v4 UUIDs truly random?
Yes. This generator uses the Web Crypto API, the same cryptographic engine that secures HTTPS connections. The only non-random bits are the 6 bits reserved for the version (4) and variant (1) fields.
Should I use UUIDs as database primary keys?
UUIDs work well as primary keys in distributed systems where sequential IDs are impractical. The trade-off is that v4 UUIDs are not sortable by creation time and use more storage (16 bytes vs 4–8 for integers). Consider UUID v7 if you need time-ordered keys.
What is the difference between UUID and GUID?
They are the same thing. GUID (Globally Unique Identifier) is the term used by Microsoft. UUID (Universally Unique Identifier) is the standard term defined by RFC 4122. The format and generation methods are identical.
Can I use UUIDs in URLs?
Yes. UUIDs contain only hexadecimal characters (0–9, a–f) and hyphens, all of which are URL-safe. They are commonly used in REST API paths like /users/550e8400-e29b-41d4-a716-446655440000.
UUID format breakdown
A v4 UUID follows the pattern xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx where:
xis any hexadecimal digit (0–9, a–f)4indicates version 4 (random)yis one of 8, 9, a, or b (variant 1)
| Section | Characters | Bits | Purpose |
|---|---|---|---|
| time_low | 8 | 32 | Random (in v4) |
| time_mid | 4 | 16 | Random (in v4) |
| time_hi_and_version | 4 | 16 | 4 bits version + 12 bits random |
| clock_seq | 4 | 16 | 2 bits variant + 14 bits random |
| node | 12 | 48 | Random (in v4) |
Privacy and security
Your generated UUIDs never leave your device. This tool runs entirely in your browser using client-side JavaScript — no API calls, no server logs, no cookies, and no tracking of generated values. The source code is fully transparent and can be inspected in your browser's developer tools.