How to generate a UUID
- Set how many you need with the slider — from 1 up to 10,000 at once.
- Pick a format: one per line for pasting into code, comma-separated for inline lists, or a JSON array for config files and test fixtures.
- Enable Uppercase if your system expects uppercase hex (Microsoft's GUID convention, some legacy databases).
- Click Generate, then Copy all.
Everything runs through crypto.randomUUID() — a browser-native function. Nothing is sent to a server, so this is safe to use even when the IDs will back real production data.
What a UUID actually is
A UUID (Universally Unique Identifier) is a 128-bit value, conventionally written as 32 hexadecimal digits split into five groups: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. The format is standardized in RFC 4122. The point of a UUID is that two independent systems — with no coordination, no central counter, no database round-trip — can each generate an identifier and be statistically certain they won't collide.
This tool generates version 4 UUIDs, the random variant. 122 of the 128 bits are random (the other 6 are fixed to mark the version and variant per the spec). That gives roughly 5.3 × 10³⁶ possible values. To put that in perspective: you could generate a billion UUIDs per second for a billion years and the probability of a single collision would still round to zero.
UUID versions, briefly
RFC 4122 defines several UUID versions, and it's worth knowing what they're for even though this tool only generates v4:
- v1 (timestamp + MAC address): Encodes the generating machine's network address and the current time. Rarely used today — it leaks information about the machine that created it, and MAC-address collection is a mild privacy concern.
- v4 (random): What this tool generates. No embedded information, purely random. The default choice for almost everything — primary keys, session tokens, correlation IDs, test fixtures.
- v5 (name-based, SHA-1): Deterministic — the same input name plus namespace always produces the same UUID. Useful when you need a stable ID derived from an existing value (e.g., converting a URL into a consistent UUID) rather than a random one.
- v7 (timestamp-ordered, newer): A 2024 addition designed for database index locality — sortable by creation time, unlike v4, while still mostly random. Worth using instead of v4 for high-volume database primary keys where insert order matters for index performance.
When to use a UUID vs. an auto-increment integer
Auto-increment integers (1, 2, 3…) are smaller, faster to index, and sort naturally by insertion order — but they require a central authority (the database) to hand them out, and they leak information: an ID of 4,812 tells a competitor roughly how many records you have.
UUIDs solve both problems. They can be generated anywhere — client-side, in a queue message, offline — before the record ever reaches a database, which matters for distributed systems and offline-first apps. They also reveal nothing about volume or creation order (v4; v1 and v7 do leak timing). The tradeoff is size (16 bytes vs. 4–8) and, for v4 specifically, worse index locality on very large tables, since random values don't cluster the way sequential ones do.
Common uses
- Database primary keys — especially in distributed or microservice architectures where multiple services need to generate IDs independently.
- API request/correlation IDs — tagging a request so it can be traced across logs and services.
- Session and API tokens — as a unique, unguessable identifier (though for anything security-sensitive, use a value generated by your server's cryptographic library, not a client-visible one).
- Test fixtures and seed data — generating realistic-looking IDs for demos and test suites.
- File and object naming — avoiding collisions when users upload files with identical names.
Privacy: what happens to the values you generate
UUIDs generated here exist only in your browser's memory and clipboard. The tool doesn't call a server, doesn't log requests, and doesn't need to — crypto.randomUUID() is a standard browser API, not something keptlocal built. Open DevTools → Network while generating and you'll see nothing happen.