UUID guide

UUID versions explained

Understand UUID v1, v4, v7, GUID, nil UUID and max UUID values before choosing an identifier format for a database, API, queue, log pipeline or test suite.

UUID versions

Choose the right UUID version

VersionHow it worksBest useWatch out for
UUID v4Random 122-bit payload with version and variant bits.General records, API resources, temporary objects and public-safe IDs.Random insert order can fragment some database indexes at scale.
UUID v7Unix timestamp prefix plus random data.Database primary keys, event streams, logs and ordered ingestion.Creation time is partially visible by design.
UUID v1Timestamp plus clock sequence and node bytes.Legacy compatibility and systems that expect v1 shape.Classic v1 can expose machine details; this tool uses random node bytes.
GUIDUUID-compatible format commonly named GUID in Microsoft stacks..NET, SQL Server, Windows APIs and cross-platform integrations.Some systems display byte order differently internally.

UUID v4

UUID v4 is random. It is a strong default for public identifiers because it does not encode creation time or machine information. Use it when simplicity and privacy matter more than natural ordering.

UUID v7

UUID v7 combines a Unix millisecond timestamp with random data. It is useful for modern databases, event ingestion and logs because recently created IDs sort together.

UUID v1

UUID v1 is timestamp-based and historically includes node information. Use it mainly for legacy compatibility, and avoid exposing classic v1 UUIDs if machine metadata is a concern.

Nil and max UUID

The nil UUID is all zeros. The max UUID is all hexadecimal f characters. They are special boundary values, not random identifiers.

UUID Versions Explained - v1, v4, v7, Nil and Max UUIDs