IDUUID Generator
Generate random UUID v4 strings
Complete UUID Guide
UUID (Universally Unique Identifier) is a 128-bit identifier standardized in RFC 4122, represented as 32 hex digits with hyphens: 550e8400-e29b-41d4-a716-446655440000. It generates globally unique IDs without a central server, making it indispensable for distributed systems, microservices, and database primary keys.
UUID Versions: v1 / v4 / v7
- UUID v1: MAC address + timestamp. Time-sortable but exposes the MAC address, raising privacy concerns.
- UUID v4: Fully random. The most widely used version;
crypto.randomUUID()is the modern standard. Collision probability is astronomically low. - UUID v7 (RFC 9562, 2024): Millisecond timestamp prefix makes it lexicographically sortable — dramatically better B-Tree index performance over v4.
UUID vs ULID vs Snowflake
| Format | Length | Sortable | Notes |
|---|---|---|---|
| UUID v4 | 36 chars | No | Universal standard, widest library support |
| UUID v7 | 36 chars | Yes | DB index optimized, RFC 9562 |
| ULID | 26 chars | Yes | Base32, URL-safe, compact |
| Snowflake | 64-bit int | Yes | Used by Twitter/Discord, requires central node |
Database UUID Primary Key Trade-offs
- Pros: No cross-server collisions, client-side pre-generation, security (prevents sequential ID exposure)
- Cons (v4): Random insertion causes B-Tree page splits → write performance degradation, larger storage
- Solutions: Use UUID v7 or ULID; in MySQL store as binary with
UUID_TO_BIN(uuid, 1)
Real-World Usage — Distributed Systems
- REST API: Client pre-generates ID and sends a PUT request, ensuring idempotency
- Offline-first apps: Create records locally without network, sync later
- Event sourcing: Unique event identification and deduplication
- File/asset management: Collision-free storage uploads
FAQ
For new projects using UUIDs as DB primary keys, prefer v7. If library compatibility is the priority, v4 is the safe choice.
Yes — hyphens are URL-safe characters so no encoding is needed. For shorter URLs, consider the No dashes option or ULID.
Yes. This tool uses the browser's crypto.randomUUID(), a CSPRNG. All processing is local — nothing is sent to a server.
Up to 50 at a time in this tool. For larger batches, call crypto.randomUUID() in a loop in Node.js — it is synchronous and extremely fast.