UUID Generator

Generate UUID v4 instantly — bulk, formatted, cryptographically random

Generate UUIDs in Code

// Browser (Web Crypto API) const uuid = crypto.randomUUID(); // native, no library needed // Node.js 14.17+ const { randomUUID } = require('crypto'); const uuid = randomUUID(); // npm: uuid package import { v4 as uuidv4 } from 'uuid'; const id = uuidv4();

UUID Versions

v1 — Time-based

Uses timestamp + MAC address. Sortable chronologically but leaks machine info. Used in Cassandra, Snowflake-style IDs.

v4 — Random ★

122 bits of random data. Most common for general-purpose IDs in databases, APIs, and distributed systems.

v5 — Name-based

SHA-1 hash of a namespace + name. Same input always produces same UUID. Useful for deterministic IDs.

v7 — New standard

Time-ordered random UUID (RFC 9562). Sortable like v1 but random like v4. Growing adoption in modern databases.

Frequently Asked Questions

A UUID (Universally Unique Identifier) is a 128-bit label in the format 8-4-4-4-12 hex digits. Example: 550e8400-e29b-41d4-a716-446655440000. Used to uniquely identify records in databases, APIs, and distributed systems.

Practically yes. UUID v4 has 2^122 ≈ 5.3 × 10^36 possible values. Generating 1 billion UUIDs/second for 85 years gives only a 50% chance of a single collision — effectively impossible in practice.

GUID (Globally Unique Identifier) is Microsoft's name for the same concept. Both follow RFC 4122 and are completely interchangeable. .NET uses GUID, most other platforms use UUID.

Yes, but v4 UUIDs are random and cause index fragmentation in B-tree indexes. For high-insert databases, prefer UUID v7 (time-ordered) or ULID which sort chronologically and are more index-friendly.

Related Tools