UUID Generator

Generate cryptographically secure v4 UUIDs using the Web Crypto API. 100% client side - no data leaves your browser.

Web Crypto API UUID v4 122-bit Entropy RFC 4122

Generate UUIDs

Each UUID contains 122 bits of cryptographically secure randomness, making collisions virtually impossible.

Count:

What is a UUID?

Universally Unique Identifier

A UUID (Universally Unique Identifier) is a 128 bit identifier that is unique across space and time. Also known as GUID (Globally Unique Identifier). Defined by RFC 4122.

Version 4 (Random)

UUID v4 uses 122 bits of random data, making the probability of generating a duplicate astronomically small - about 1 in 5.3 x 10^36.

Common Use Cases

Database primary keys, session identifiers, API request IDs, distributed system correlation IDs, file naming, and transaction references.

Format: 8-4-4-4-12

UUIDs follow the format xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx where '4' indicates version 4 and 'y' is one of 8, 9, a, or b (variant bits).

UUID Versions Compared

UUID v1 - Time based

Based on timestamp and MAC address. Sortable but leaks hardware identity. Not recommended for privacy-sensitive applications.

UUID v4 - Random (This tool)

122 bits of cryptographic randomness. No information leakage. The most widely used version for general-purpose unique identifiers.

UUID v7 - Time-ordered (New)

Combines Unix timestamp with random bits. Sortable by creation time. Better for database indexing than v4. Defined in the new RFC 9562.

ULID - Alternative

Universally Unique Lexicographically Sortable Identifier. 128 bit, Crockford Base32 encoded. Sortable, URL safe, and monotonically increasing.

UUID FAQ

What is the difference between UUID and GUID?
UUID (Universally Unique Identifier) and GUID (Globally Unique Identifier) are the same thing. UUID is the standard term from RFC 4122/9562. GUID is the Microsoft term. The format is identical: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.

Can two UUIDs ever be the same?
Theoretically yes, but the probability is vanishingly small. UUID v4 has 122 random bits, giving 5.3 x 10^36 possible values. You would need to generate 2.71 x 10^18 UUIDs to have a 50% chance of a single collision. In practice, UUID collisions do not happen.

Should I use UUID v4 or v7?
Use v4 when you need a random, non-guessable identifier (session tokens, API keys, security contexts). Use v7 when you need time-sorted IDs for database primary keys (better B-tree index performance than random v4). This tool generates v4 UUIDs using the cryptographically secure Web Crypto API.

How do I generate a UUID in JavaScript?

// Modern browsers (Web Crypto API)
crypto.randomUUID()  // "a1b2c3d4-e5f6-4a7b-8c9d-e0f1a2b3c4d5"

// Node.js 19+
import { randomUUID } from 'crypto';
randomUUID();

Are UUIDs safe to use as API keys or tokens?
UUID v4 provides 122 bits of randomness, which is generally sufficient. However, for high-security tokens, consider using a longer random string (256 bits) via crypto.getRandomValues(). Generate secure passwords with our Password Generator.

Related Tools