What a UUID is
A UUID (Universally Unique Identifier) is a 128-bit label defined in RFC 4122. It is written as five groups of hexadecimal digits separated by hyphens, in the pattern 8-4-4-4-12 — for example, 550e8400-e29b-41d4-a716-446655440000. That specific format produces 32 hex characters plus 4 hyphens, 36 characters total.
The "universally unique" claim holds in practice because the identifier space is large enough that random generation produces collisions at a rate that is, for all engineering purposes, zero. UUIDs are generated independently by any system without any central registry or coordination service.
UUID versions: 1, 3, 4, and 5
Version 1 combines a 60-bit timestamp with the MAC address of the generating machine. It is time-ordered and traceable — you can extract the creation time and the network interface that generated it. That traceability is a privacy concern; version 1 UUIDs have been used to identify the machine that created a document.
Version 3 takes a namespace UUID and a name string, hashes them with MD5, and produces a deterministic UUID. Given the same namespace and name, you always get the same UUID. This is useful for generating stable identifiers for resources that have natural names (URLs, DNS names). Version 5 is identical in concept but uses SHA-1 instead of MD5 — prefer version 5 over version 3 for new work.
Version 4 is purely random: 122 bits of randomness plus 6 bits of version/variant flags. It is the most widely used variant and the default for most UUID libraries. The collision probability for any two version 4 UUIDs is approximately 1 in 5.3×1036 — generating a duplicate by chance in any realistic system is not a concern.
Common UUID use cases
Database primary keys are the most frequent use. UUIDs let distributed systems — microservices, mobile clients, background workers — insert rows without querying a central sequence. A mobile app can create a record offline, assign it a UUID locally, and sync it to the server later with no ID conflict risk.
UUIDs also appear as session tokens, API resource identifiers, file upload names (to avoid collisions on shared storage), and idempotency keys for payment APIs. Any scenario where multiple systems need to create identifiers independently and merge them later is a good fit for UUIDs.
Test data generation is another practical use. When seeding a database for development or writing fixtures for integration tests, generating UUID primary keys with the UUID generator gives you values that match production format and won't collide with real records if test data leaks.
How to generate a UUID
Open the UUID generator. The tool generates a version 4 UUID client-side using the browser's crypto.getRandomValues() API — the same cryptographically secure source used by browser crypto implementations. No data leaves your browser. Click "Generate" for a single UUID or set a batch count to generate up to 100 at once.
The output copies to clipboard with one click. For bulk output, the tool provides a plain-text list, one UUID per line, ready to paste into a SQL seed file, a spreadsheet, or a fixture file. Uppercase and lowercase output are both available; most systems accept either, but check your database collation if you are storing UUIDs as CHAR(36) columns.
UUIDs vs sequential integer IDs
Sequential integers win on storage and index performance. A 4-byte integer is smaller than a 16-byte UUID in a B-tree index, and sequential inserts produce ordered index pages with less fragmentation. For a single-server application with no distribution requirement, auto-increment integers are simpler and faster.
UUIDs win on distribution, privacy, and security. Sequential IDs expose your record count (a request to /orders/10042 tells a competitor you have roughly 10,000 orders). They also enable enumeration attacks — incrementing an ID by 1 to access a neighboring record is a common API vulnerability. UUIDs are not guessable. The choice comes down to whether your system operates across multiple write sources and whether exposing a numeric sequence is acceptable.
For ID generation beyond UUIDs, the hash generator produces fixed-length digests from arbitrary input, and the password generator creates random strings with configurable character sets when a UUID's format doesn't fit your requirements.
Picking the right ID for your system
Version 4 UUID for most new work: random, no privacy leak, no coordination needed, supported natively by every major database (PostgreSQL has a native uuid type; MySQL 8 does too). Version 5 when you need deterministic IDs derived from names. Sequential integers when you need the smallest possible index footprint on a single-server setup.
Generate a UUID for any immediate need using the UUID generator — no account, no rate limit, no server call.