UUID Generator

Generate UUIDs (v4 and v1) instantly. Bulk generation up to 500 UUIDs. Copy or download as text file.

UUIDs (Universally Unique Identifiers) are 128-bit identifiers used to label resources in computer systems without requiring a central authority to coordinate. They appear in the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx and are designed so that any two independently generated UUIDs will be different with overwhelming probability.

UUID v4 generates all 122 bits randomly (the remaining 6 bits encode the version and variant). This makes v4 the most commonly used version for general-purpose IDs in web applications, databases, and APIs. UUID v1 is time-based and incorporates the MAC address of the generating machine, which can be useful for time-ordered records but is less private.

Common use cases for UUIDs include database primary keys in distributed systems where auto-increment integers would conflict across shards, unique identifiers for API resources like users, orders, and sessions, idempotency keys for HTTP requests to prevent duplicate processing, and correlation IDs for tracing requests across microservices.

This tool generates UUIDs locally in your browser using the uuid library. Generate one at a time or up to 500 in bulk, copy them to the clipboard, or download them as a newline-separated text file. No server is involved — your UUID generation stays private.

UUID version landscape

The UUID specification (RFC 9562, which supersedes RFC 4122) defines several versions, each with a different strategy for generating the 128 bits:

  • v1 — timestamp plus MAC address. Time-ordered, but leaks the generating machine's network address.
  • v3 / v5 — hash-based. Deterministic: the same name plus namespace always produces the same UUID. v3 uses MD5, v5 uses SHA-1.
  • v4 — fully random (122 bits of entropy). The default choice for most general-purpose IDs since the mid-2000s.
  • v7 — time-ordered with a random tail. Combines the database-friendliness of v1 with the privacy of v4 by dropping the MAC component. Newer; support is growing in libraries and databases.
  • v8 — custom. A version number reserved for implementation-defined layouts that still fit in a 128-bit UUID.

Picking the right version

For external identifiers that appear in URLs or API responses, v4 stays a solid default — no time leakage, no machine identification. For database primary keys on high-throughput tables, consider v7 or a library equivalent such as ULID; the time ordering dramatically improves B-tree insert performance. For deterministic IDs (mapping an external string key to a stable UUID), v5 is the right tool.

Common mistakes

  • Treating UUID strings as case-sensitive. The specification defines them as case-insensitive. Store and compare in a single canonical case (lowercase is the usual choice).
  • Storing as VARCHAR(36) when a BINARY(16) would do. UUIDs are 16 bytes. Storing them as text more than doubles the storage and slows down indexing.
  • Generating on the client and trusting it. A client-generated UUID is fine for idempotency keys and trace IDs, but treat it as untrusted input if it will be used as a database primary key — validate format and uniqueness on the server.

Related reading

For a side-by-side comparison of v4 and v7 with database performance numbers, see UUID v4 vs v7: which should you use?

Frequently Asked Questions