What is a UUID?

A UUID (Universally Unique Identifier) is a 128-bit value used to identify something — a database row, a request, a file, a session — without needing a central authority to hand out the next number. It's usually written as 32 hexadecimal digits split into five groups with hyphens, like 3b12f1df-5232-4e0e-8a68-d20c8dfbe5c8. The format is standardized in RFC 4122. The key property is that any two parties, generating UUIDs completely independently with no coordination between them, can trust their IDs won't collide. That's what makes UUIDs useful in distributed systems, where an auto-incrementing integer would require a shared counter.

Why not just use auto-increment integers?

An auto-increment ID (1, 2, 3...) needs a single source of truth handing out the next number — usually your database. That's fine for one server, but it breaks down the moment you have multiple services, offline clients, or sharded databases generating records independently: two services could both hand out ID 42. UUIDs sidestep the problem entirely, since each one is generated locally and is (for practical purposes) guaranteed unique without ever talking to a central counter. The tradeoffs: UUIDs are 128 bits instead of 4 or 8 bytes, they're not sequential (which can hurt database index locality), and they're not human-readable at a glance. Most systems accept that cost for the coordination-free uniqueness.

UUID v4 vs. other versions

RFC 4122 defines several UUID versions that differ in how the bits are derived. Version 1 is time-based and includes a piece of the generating machine's network identity. Version 3 and version 5 are deterministic — they hash a namespace plus a name, so the same input always produces the same UUID. Version 4, the one this generator produces, is pure randomness: 122 of its 128 bits are random, with the remaining 6 bits fixed to mark the version and variant per the spec. Version 4 is the default choice for most applications today because it needs no input data and carries no identifying information about when or where it was generated.

How pixeltools' generator works

pixeltools' UUID generator calls the browser's own crypto.randomUUID() — a native Web Crypto API method that returns a lowercase, hyphenated v4 UUID straight from the browser's cryptographically secure random number generator. The tool never rolls its own random bytes; it only reformats what crypto.randomUUID() gives back, so the underlying randomness is exactly as strong as the browser's crypto implementation. Because generation happens with a browser API, nothing is sent to a server — the whole thing runs client-side. You can generate a batch of UUIDs (from 1 up to 100 at once) and toggle hyphens, uppercase, and braces (for APIs that expect a wrapped GUID like {3b12f1df-...}) live, without regenerating. Results can be copied individually, copied as a batch, or downloaded as a .txt file.

Real-world use cases

Database primary keys are the most common use — especially in distributed or sharded setups where you can't rely on one auto-increment sequence. Request IDs and correlation IDs use UUIDs to trace a single request across multiple microservices in logs. Session tokens and API keys sometimes use UUIDs as a base (though security-critical tokens usually want more entropy or extra structure). Test data and fixtures use bulk-generated UUIDs to fill out mock records quickly. Config files, feature flag keys, and one-off tracking identifiers are other common spots where you need a unique string and don't want to think too hard about picking one.

Formatting: UUID vs. GUID

The canonical UUID string is 36 characters: 32 hex digits plus 4 hyphens, all lowercase. Some systems want variations — no hyphens (a 32-character hex blob), uppercase, or wrapped in curly braces. That braced format, like {3b12f1df-5232-4e0e-8a68-d20c8dfbe5c8}, comes from Microsoft's COM and Windows API conventions, where the identifier is called a GUID (Globally Unique Identifier) rather than a UUID. The two terms describe the same 128-bit format standardized by RFC 4122 — GUID is just Microsoft's branding for it, and the values are interchangeable once you strip or add the braces. Check what your target system expects before generating a batch.