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 guide
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
| Version | How it works | Best use | Watch out for |
|---|---|---|---|
| UUID v4 | Random 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 v7 | Unix timestamp prefix plus random data. | Database primary keys, event streams, logs and ordered ingestion. | Creation time is partially visible by design. |
| UUID v5 / v3 | Deterministic hash of a namespace and name (SHA-1 for v5, MD5 for v3). | Stable IDs derived from URLs, paths or external keys; deduplication. | Output is predictable, so it is never a secret. |
| UUID v1 | Timestamp 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. |
| GUID | UUID-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 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 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 v5 and v3 are name-based: they hash a namespace and a name into a deterministic UUID. The same inputs always yield the same identifier, which is ideal for stable IDs derived from URLs, paths or external keys. Prefer v5 (SHA-1) over v3 (MD5) for new systems.
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.
The nil UUID is all zeros. The max UUID is all hexadecimal f characters. They are special boundary values, not random identifiers.