UUID Generator

Generate RFC 4122 compliant UUIDs — v1 (time-based), v4 (random), v5 (namespace+name), bulk generation.

About UUID Generator

A UUID (Universally Unique Identifier), also known as a GUID (Globally Unique Identifier), is a 128-bit identifier formatted as 32 hexadecimal characters separated by hyphens: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. The probability of generating two identical UUIDs is so astronomically small that UUIDs are considered unique in practice.

UUID v4 is the most commonly used variant — it generates all 122 bits randomly using a cryptographically secure random number generator. UUID v1 encodes the current timestamp and MAC address, making it sortable by generation time but potentially exposing system information. UUID v5 generates a deterministic UUID from a namespace and name using SHA-1 hashing — the same input always produces the same UUID.

UUIDs are widely used as primary keys in distributed databases (avoiding auto-increment collision across multiple database servers), as session tokens, file names, API resource identifiers, and correlation IDs in microservices logging.

FAQ

Should I use UUID v4 or v7 as a database primary key?
UUID v4 is fully random, which causes index fragmentation in B-tree indexes. UUID v7 (a newer standard) is time-ordered, which inserts in order and avoids fragmentation — making it much better for database primary keys. For current compatibility, many teams use ULID or sequential UUIDs as alternatives.
What is a GUID? Is it the same as a UUID?
GUID (Globally Unique Identifier) is Microsoft's term for UUID. They are the same format — GUID is the name used in Microsoft technologies (.NET, SQL Server, COM), while UUID is the standard term in RFC 4122 and most other contexts.