UUID Generator

Generators

Generate unique UUIDs (v4 random, v7 timestamp)

Click Generate to create UUIDs

Learn More About UUID Generator

2 articles to help you understand and use this tool effectively

UUID Generator FAQ

Common questions about using the UUID Generator tool

A UUID (Universally Unique Identifier) is a 128-bit identifier that is unique across space and time. Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. UUIDs are used as database primary keys, session IDs, and anywhere globally unique identifiers are needed.

UUID v4 is randomly generated (122 random bits), offering maximum randomness but no ordering. UUID v7 combines a Unix timestamp with random bits, making it chronologically sortable while remaining unique. v7 is better for database performance due to sequential ordering.

To generate a UUID: 1) Select the version (v4 or v7), 2) Choose quantity (single or bulk), 3) Click 'Generate', 4) Copy the UUID(s). In JavaScript, use crypto.randomUUID() for v4, or libraries like 'uuid' for other versions.

UUIDs are designed to be unique without central coordination. UUID v4 collision probability is astronomically low - you'd need to generate 1 billion UUIDs per second for 85 years to have a 50% chance of one collision. For practical purposes, they're unique.

UUIDs are better for: distributed systems, security (non-guessable), and data merging. Auto-increment is better for: smaller storage, simpler queries, and single-database systems. UUID v7 offers a middle ground with sortability and distributed generation.

Storage options: 1) Native UUID type (PostgreSQL, MySQL 8+) - most efficient, 2) BINARY(16) - compact storage, 3) VARCHAR(36) - human-readable but larger. PostgreSQL's UUID type is recommended; for MySQL, use BINARY(16) with UUID_TO_BIN().

GUID (Globally Unique Identifier) is Microsoft's term for UUID. They're functionally identical - same format, same generation methods. Use 'UUID' in cross-platform contexts, 'GUID' in Microsoft/.NET environments.

Yes! Modern browsers and Node.js support crypto.randomUUID() for UUID v4. For v7 or other versions, use the 'uuid' npm package: import { v4, v7 } from 'uuid'. Avoid Math.random()-based implementations for production use.

Nil UUID is all zeros (00000000-0000-0000-0000-000000000000), often used as a placeholder or null value. Max UUID is all f's (ffffffff-ffff-ffff-ffff-ffffffffffff). Both are valid UUIDs with special conventional meanings.

Use regex: /^[0-9a-f]{8}-[0-9a-f]{4}-[1-7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i. This validates the format and version/variant bits. For stricter validation, check the version digit (position 15) matches expected version (1-7).