HomeToolsgeneralUUID Generator
Last Updated: August 24, 2026Verified

Generate UUIDs — Cryptographically Random, In Your Browser

A UUID (Universally Unique Identifier) is a 128-bit identifier formatted as xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx — for example: 550e8400-e29b-41d4-a716-446655440000. The "universally unique" part isn't marketing: the collision probability of randomly generated UUIDs is so vanishingly small that for all practical purposes, you can generate them indefinitely without ever producing the same one twice.

Cluster Tools generates UUIDs using the Web Crypto API (crypto.randomUUID() for v4, crypto.getRandomValues() for custom implementations). This uses your device's OS-level cryptographic entropy, not JavaScript's predictable Math.random().

UUID Versions

UUID v4 (Random)

The most commonly used version. 122 bits of cryptographic randomness, with 6 bits used for version and variant identification. The only structure is the format.

f47ac10b-58cc-4372-a567-0e02b2c3d479

Use when: you need a unique ID and don't need it to be sortable or have any inherent meaning.

UUID v1 (Timestamp-based)

Combines the current timestamp (in 100-nanosecond intervals since October 15, 1582) with the MAC address of the generating machine (or a random node ID in browser environments). The result encodes when it was generated.

6ba7b810-9dad-11d1-80b4-00c04fd430c8

Use when: you need IDs that are sortable by creation time (though ULIDs are better for this use case). Note: in browser environments without MAC address access, the node portion is random.

UUID v7 (Monotonic Time-ordered) [coming]

A newer UUID version (RFC 9562, 2024) with a Unix millisecond timestamp in the most-significant bits, making them lexicographically sortable — ideal for database primary keys. Better than v1 for modern use.

When to Use UUIDs

Database primary keys — UUIDs as primary keys avoid the predictability problem of sequential integers. Users can't guess other record IDs by incrementing yours. They also work for distributed systems where multiple nodes generate IDs independently without coordination.

API resource identifiers — exposing sequential IDs in your API (/users/1, /users/2) reveals business metrics (how many users you have) and enables enumeration attacks. UUIDs prevent both.

Session tokens and correlation IDs — a UUID per request lets you trace a specific request through distributed logs without revealing user information.

File naming — naming uploaded files with UUIDs prevents filename collisions and prevents users from guessing other uploaded files' names.

Idempotency keys — include a UUID in requests to guarantee a server can detect and ignore duplicate submissions (e.g., avoiding double-charging on payment retries).

Bulk Generation

Cluster Tools generates 1 to 1,000 UUIDs at once. Bulk generation is useful for:

  • Pre-generating IDs for a database seed script.
  • Generating test data for development environments.
  • Creating multiple session tokens for testing.

Frequently Asked Questions

What's the probability of a UUID v4 collision? For 103 trillion UUIDs (generating one per second for 3.26 million years), the probability of a single collision reaches just 50%. For any realistic application, collisions are impossible in practice.

Are Cluster Tools's UUIDs cryptographically secure? UUID v4 generated with crypto.randomUUID() uses the browser's CSPRNG — the same entropy source as cryptographic key generation. They're suitable for security-sensitive use cases.

What's the difference between UUID and GUID? They're the same thing. GUID (Globally Unique Identifier) is Microsoft's name for the same 128-bit identifier format. The format is identical; the term differs by platform.

Should I use UUID v4 or v7 for database primary keys? UUID v7 is better for databases because it's time-ordered — this means new rows are inserted at the end of the index, reducing B-tree fragmentation (the "UUID primary key performance problem" with v4). UUID v7 support is growing as of 2024.

Related Tools