UUID Generator

Generate UUID v4, v7, or NIL in bulk. Multiple formats, copy, and file download supported.

Result

Pick options above and press Generate.

UUID Inspector

Paste a UUID to see its version, variant, and creation time (v7).

What is a UUID?

A UUID (Universally Unique Identifier) is a 128-bit identifier defined by RFC 4122 / RFC 9562. It can be generated independently with a near-zero collision probability, making it ideal for database primary keys, distributed systems, and file identifiers.

Versions at a glance

Why prefer v7?

UUID v4 is fully random and tends to fragment B-tree indexes when inserted into databases. v7 is monotonically increasing in time, so new rows append to the end of the index - better INSERT performance, and you can recover the creation time directly from the UUID.

To embed UUIDs in JSON payloads, use the JSON Formatter & Converter. To use a UUID as the @id value in structured data, see the JSON-LD Generator.

UUID Misconceptions and Pitfalls

UUIDs are nearly inexhaustible to generate, but used carelessly they can quietly degrade database performance or introduce security issues.

The "v4 UUIDs never collide" misconception

v4 draws from 122 random bits, making collision probability vanishingly small - but not mathematically zero. In high-scale systems, pairing UUID columns with a database UNIQUE constraint is still the safe choice. Also, weak random sources like Math.random() make UUIDs predictable and unsuitable as security tokens. Always use a cryptographically secure source (crypto.getRandomValues or crypto.randomUUID).

Pitfalls when using UUIDs as a database primary key

Version selection guide

Use caseRecommended versionReason
General identifiers (API tokens, sessions, temp IDs)v4Unpredictable; collision negligible
Database primary keys, time-ordered IDsv7Index-friendly; creation time extractable
Namespace-based deterministic IDsv5 (SHA-1)Same input always yields same UUID; useful for idempotency keys
Representing "no value"NILAll-zeros special value distinct from SQL NULL

Frequent mistakes

FAQ

Will UUIDs ever collide?

Even at 1 billion v4 UUIDs per second, you'd need around 85 years to reach a 50% collision probability. For typical applications, collisions are not a concern.

Is the randomness secure?

This page uses the browser's crypto.getRandomValues() (cryptographically secure RNG). It does not use Math.random().

Are generated UUIDs sent to a server?

No. Everything happens in your browser. No data leaves your device.

Why no v1, v3, or v5?

v1 leaks MAC addresses and is discouraged; v3/v5 require namespaces and don't fit a general-purpose generator. We provide the most practical versions: v4, v7, and NIL.