UUID Generator
Generate cryptographically secure UUID v4. Bulk generate, copy individually or all at once.
ad9b1fe1-0949-406c-ae28-7f2e87de908fGenerated using crypto.randomUUID() — cryptographically secure UUID v4.
UUID v4 format explained
A UUID is 128 bits displayed as 32 hex digits in 5 groups separated by hyphens: 8-4-4-4-12. The version (4) and variant bits are fixed; the remaining 122 bits are random.
xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx | | | | | | | | | └─ 12 random hex chars | | | └────── variant bits (8, 9, a, or b) | | └─────────── version = 4 | └──────────────── 4 random hex chars └───────────────────────── 8 random hex chars Example: f47ac10b-58cc-4372-a567-0e02b2c3d479
When to use UUIDs
- Database primary keys — UUIDs let clients generate IDs before inserting rows, enable safe merging of records across databases, and avoid sequential ID leakage.
- Session and request IDs — trace requests across microservices with a correlation ID that's guaranteed unique without a central counter.
- File names for uploads — prevent filename collisions and path traversal by replacing user-provided names with a UUID before storing.
- Idempotency keys — pass a UUID in payment or mutation requests so the server can detect and ignore duplicate submissions.
Generating UUIDs in code
// JavaScript / TypeScript (modern browsers + Node 14.17+) const id = crypto.randomUUID(); // → "550e8400-e29b-41d4-a716-446655440000" // Python import uuid id = str(uuid.uuid4()) // Go import "github.com/google/uuid" id := uuid.New().String() // PostgreSQL SELECT gen_random_uuid(); -- built-in since v13
Related Tools
Frequently Asked Questions
What is a UUID?
A UUID (Universally Unique Identifier) is a 128-bit identifier that is unique across space and time. UUID v4 uses random numbers, making collisions extremely unlikely (1 in 2^122).
What is UUID v4?
UUID v4 is generated using random or pseudo-random numbers. The version digit is always 4. This tool uses crypto.randomUUID() which provides cryptographically secure randomness.
Can I generate multiple UUIDs at once?
Yes. Use the quantity buttons (1, 5, 10, 25) to bulk generate UUIDs. You can copy all of them at once or individually.
Is the UUID truly random?
Yes. This tool uses the Web Crypto API (crypto.randomUUID()) which provides cryptographically secure random values, the same quality used for encryption.