UUID Generator

Generate cryptographically random UUID v4 identifiers instantly — single or bulk. All generated in your browser.

Frequently Asked Questions

A UUID (Universally Unique Identifier), also called a GUID, is a 128-bit label used to uniquely identify information across distributed systems. The standard format is xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx — 32 hex digits split into 5 groups by hyphens. Version 4 UUIDs are randomly generated (122 random bits), giving a collision probability so low it is considered practically impossible.

UUID version 4 is generated using a cryptographically secure random number generator. The version bits (4 in position 13) and the variant bits (8, 9, A, or B in position 17) are set deterministically; the remaining 122 bits are random. It is the most widely used UUID version for unique identifiers in databases, APIs, and file systems.

In theory yes, but the probability is astronomically small — approximately 1 in 5.3 × 10³⁶. To put it in perspective: you would need to generate 1 billion UUIDs per second for 85 years before the probability of a single collision reached 50%.

How UUID v4 Generation Works

A UUID v4 is 128 bits of data, structured according to RFC 4122, with 122 bits of cryptographic randomness.

Generate Random Bits

The browser's crypto.randomUUID() (or crypto.getRandomValues() fallback) generates 128 bits of CSPRNG data from the operating system's entropy pool.

Set Version & Variant Bits

Bits 48–51 are set to 0100 (version 4). Bits 64–65 are set to 10 (RFC 4122 variant). These 6 deterministic bits identify this as a valid v4 UUID.

Format as Hyphenated Hex

The 128 bits are hex-encoded and split into 5 groups: 8-4-4-4-12 characters. The 4th group always starts with 4 and the 5th starts with 8, 9, a, or b.

Common Use Cases

Database Primary Keys

UUIDs are ideal primary keys in distributed databases where multiple nodes insert records simultaneously. Unlike auto-increment integers, they require no coordination to guarantee uniqueness across shards.

Microservice Request IDs

Pass a UUID as a X-Request-ID or correlation ID header to trace a request across multiple services. Each service logs the same ID, making it easy to reconstruct a distributed trace.

Collision-Safe File Names

When storing user uploads, rename files to UUIDs before saving. This prevents path traversal attacks, filename collisions, and information leakage from predictable file names.

Client-Side Object Identity

In single-page apps, UUIDs are used as stable keys for UI elements (lists, forms, tabs) before they're saved to the backend — React, Vue, and Angular all benefit from stable unique keys.

Configuration & Plugin IDs

Plugins, extensions, and configuration blocks in multi-tenant SaaS apps use UUIDs to identify instances uniquely across tenants without relying on sequential integers that could be guessed.

Batch ID Generation

Use the count selector to generate up to 100 UUIDs at once for seeding test databases, pre-allocating IDs, or bulk-generating identifiers for an import script.