Dev Tools Dev UUID Generator
100% client-side · No signup · Free forever

UUID / GUID Generator

Generate cryptographically strong UUID v4 values. Bulk create up to 100 at a time.

1
Dev tool
UUID Generator
Live
Generated UUIDs

A UUID generator produces 128-bit universally unique identifiers — the de facto standard for assigning IDs in distributed systems where you can't rely on a central authority to hand out sequential numbers. This tool generates UUID version 4 (random) using the browser's crypto.randomUUID() API, which sources entropy from the OS cryptographically-secure random number generator. The probability of collision is so low (1 in 2122) that you can generate billions of UUIDs per second for centuries without expecting a duplicate.

How UUID v4 Generation Works

UUID v4 is just 122 random bits plus 6 bits of versioning/variant metadata, formatted as 32 hex characters in five hyphen-separated groups: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx where the third group always starts with 4 (the version) and the fourth group starts with 8, 9, a, or b (the variant). The randomness comes from crypto.getRandomValues(), which on every modern browser/OS uses a CSPRNG seeded from hardware sources (RDRAND, /dev/urandom, etc.). This is exactly the same entropy source used for TLS session keys and password hashing.

When to Use UUIDs

  • Database primary keys — especially in distributed systems where multiple servers insert concurrently.
  • Idempotency keys — pass a UUID with each API request so the server can deduplicate retries.
  • Session IDs — opaque, unguessable session identifiers for cookies.
  • File names — uploading files? Use a UUID to avoid collisions and path-traversal risks.
  • Correlation IDs — trace a request through microservices by passing a UUID in headers.
  • Test fixtures — generating realistic test data quickly.

UUID Generation in Code

// Browser / Modern Node.js (18+)
const uuid = crypto.randomUUID();
// => "f47ac10b-58cc-4372-a567-0e02b2c3d479"

// Older Node.js
const { randomUUID } = require('crypto');
const uuid = randomUUID();

// Python
import uuid
uid = str(uuid.uuid4())

// Postgres
SELECT gen_random_uuid();  -- requires pgcrypto extension

UUID v4 vs. v7 vs. ULID

UUID v4 is fully random — great for unguessability, but poor for database index locality (each new row inserts into a random spot in the B-tree, hurting cache hit rates). UUID v7 (newer RFC 9562 spec) embeds a millisecond timestamp in the high bits, giving you time-sorted IDs with the unguessability of v4 in the low bits — much friendlier to database indexes. ULIDs are similar to v7 but use Crockford's base32 (shorter strings, no hyphens, case-insensitive). For new projects, prefer UUID v7 or ULID over v4 when your IDs end up as database primary keys.

Frequently Asked Questions

Everything you need to know about the UUID Generator.

Are the UUIDs truly random?

Yes. We use the native crypto.randomUUID() API which uses the browser cryptographic random number generator.