UUID Basics: Versions and Variants

Universally Unique Identifiers (UUIDs) are 128-bit values used to create unique IDs without central coordination. They are widely adopted across databases, APIs, and distributed systems.

Structure

A UUID is typically represented as a 36-character string: 32 hex digits and 4 hyphens (8-4-4-4-12). Example: 123e4567-e89b-12d3-a456-426614174000.

Versions

Variants

Variants define the layout; the most common is the RFC 4122 variant used in modern systems.

Why v4?

Random UUIDs are usually the safest default: no metadata leakage, easy generation, and excellent uniqueness at typical scales.

Try It

Generate UUID v4 Validate UUID