UUID / GUID Generator
Generate RFC 4122 v4 UUIDs in bulk.
What is UUID / GUID Generator?
A UUID generator is a tool that produces universally unique identifiers, 128-bit values formatted as 32 hexadecimal digits in five hyphenated groups (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). UUIDs are defined by RFC 4122 and the newer RFC 9562, and the same identifier is statistically guaranteed never to be generated twice across any system, anywhere in the world.
This UUID generator produces values using the browser’s crypto.randomUUID API, which emits cryptographically random v4 UUIDs that conform to RFC 4122 section 4.4. Backend developers seeding primary keys, mobile engineers tagging analytics events, and DevOps teams labeling deploys use UUIDs whenever a system needs unique IDs without a central coordinator handing them out.
Why use a UUID generator?
- Avoid ID collisions without coordination. Two services on different continents can mint UUIDs at the same millisecond and the values will not collide, so you do not need a sequence server or shared lock.
- Decouple primary keys from row order. Random v4 UUIDs do not leak insertion order, customer count, or growth rate the way auto-increment integers do.
- Generate IDs offline or client-side. A mobile app or browser tab can create the ID before any network call, so optimistic UI and offline queues both work.
- Seed test fixtures quickly. Drop 100 UUIDs into a SQL
INSERTblock to populate a dev database without thinking about uniqueness. - Stay private. Every UUID is generated locally in your browser tab. No request hits a server, so even values intended for production secrets stay on your machine.
How to use the UUID Generator
- Set the Count field to the number of UUIDs you need, from 1 to 100.
- Click Generate to produce the batch.
- Read the values in the output pane.
- Click Copy to put every UUID on your clipboard as a newline-separated list.
A typical batch of four v4 UUIDs looks like:
6f47a3b1-9c2e-4d8a-b015-77f3a9c2e1d4
2c1f8e9d-4b67-4e3a-9c08-1f6e7d8a9b0c
8a3d5b6f-7e2c-49a1-bd05-3e9c1f7a8d2b
fd7e2a91-3b6c-48d5-ae09-6f1c2d3e4f5aUUID versions explained
RFC 4122 defines five UUID versions, and RFC 9562 added three more (v6, v7, v8) in 2024. Each version uses a different generation strategy and is identified by the first hex digit of the third group.
| Version | Generation strategy | Time-sortable | Best for | Notes |
|---|---|---|---|---|
| v1 | MAC address + timestamp (100 ns) | Yes | Legacy systems, distributed event ordering | Can leak MAC address. Largely superseded by v7. |
| v3 | MD5 hash of a name in a namespace | No (deterministic) | Generating reproducible IDs from URLs or DNS names | MD5 is weak; prefer v5. |
| v4 | 122 random bits | No | General-purpose IDs, primary keys, request IDs | The default for most apps. What this tool emits. |
| v5 | SHA-1 hash of a name in a namespace | No (deterministic) | Same use as v3, with a stronger hash | Deterministic: same input always returns the same UUID. |
| v6 | Reordered v1 timestamp | Yes | Drop-in replacement for v1 with better index locality | Rare; v7 is preferred for new systems. |
| v7 | Unix epoch ms + 74 random bits | Yes | Database primary keys that benefit from B-tree locality | Recommended for new systems by RFC 9562. |
The browser’s crypto.randomUUID returns v4 UUIDs. For v1 or v7, use a server-side library such as uuid on Node.js or uuid7 in Python.
How UUID v4 stays unique
A v4 UUID has 122 random bits (the other six are fixed for version and variant). The probability of generating a duplicate, the so-called birthday collision, becomes meaningful only after producing about 2.71 quintillion (2.71 x 10^18) UUIDs. Even at one million per second, you would need 85,000 years to reach a 50 percent chance of one collision in the entire set.
Format: xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx
^ ^
| variant bits (10xx = RFC 4122 variant)
version digit (4 = random)The randomness comes from crypto.getRandomValues, which proxies to the operating system’s cryptographically secure random number generator. This is the same source that backs HTTPS key generation, so the entropy is suitable for security-sensitive use cases such as session tokens.
Common use cases
- Backend developers assigning primary keys. Use a UUID instead of an auto-increment integer for tables synced across regions or shared with external partners.
- Mobile engineers tagging events. Generate a UUID for each crash report or analytics event on the device so the backend can dedupe regardless of network retries.
- DevOps engineers labeling resources. Tag deploys, Kubernetes pods, and infrastructure runs with a UUID for tracing across logs and metrics.
- QA engineers seeding databases. Drop a list of UUIDs into a SQL fixture to give every test row a stable, predictable ID.
- Frontend developers generating correlation IDs. Mint a UUID on the client and send it in a request header so the same ID appears in browser DevTools and server logs.
UUID Generator vs alternatives
| Tool | Best for | Offline | Cost | Limitations |
|---|---|---|---|---|
uuidgen (CLI) | Scripts, CI pipelines, one-off shell use | Yes | Free | v1 by default on macOS, v4 on Linux. |
Node.js crypto.randomUUID() | Server-side generation in JS apps | Yes | Free | Requires Node 14.17+. |
Database functions (gen_random_uuid() in Postgres) | DB-side primary key defaults | Yes | Free | Bound to the DB session. |
| This UUID Generator | Quick batch generation in a browser | Yes (runs in browser) | Free | v4 only. For v1 or v7, use a server library. |
Frequently asked questions
Are UUIDs truly random?
UUID v4 values are generated from 122 cryptographically random bits drawn from the operating system entropy pool. The randomness is the same quality that backs TLS key generation, so the values are unpredictable. Versions v1 and v7 mix a timestamp into the value, so they are partly deterministic but still unique.
Can UUIDs collide?
In theory, any random scheme can collide. In practice, the v4 collision probability is negligible. You would need to generate about 2.71 quintillion UUIDs before a duplicate becomes 50 percent likely. For comparison, every human on Earth generating one UUID per second for a lifetime would not come close.
Which UUID version should I use?
Use v4 for general-purpose IDs, request tracking, and most primary keys. Use v7 when you want time-sortable IDs that play well with B-tree indexes (Postgres, MySQL clustered keys). Use v5 when you need a deterministic UUID derived from a name. Avoid v1 in new systems; it can leak the generating machine’s MAC address.
What version does this tool generate?
This tool calls crypto.randomUUID, which returns RFC 4122 version 4 UUIDs. The third group always starts with the digit 4, and the fourth group starts with 8, 9, a, or b to mark the RFC 4122 variant.
Is a UUID a GUID?
Yes. GUID (Globally Unique Identifier) is Microsoft’s name for the same 128-bit value, used in COM and the .NET ecosystem. The format and uniqueness properties are identical; only the name differs. A UUID generated here works anywhere a GUID is expected.
Why is my database slow when I use UUIDs as primary keys?
v4 UUIDs are random, so each insert lands in a different leaf of a B-tree index. This causes page splits and reduces cache locality compared to monotonic integers. The fix is to switch to v7 UUIDs, which are time-ordered, or to use a sequential GUID variant in SQL Server.
Are UUIDs case-sensitive?
The canonical text representation uses lowercase hex digits, but RFC 4122 says implementations must accept both cases on input. Postgres stores UUIDs canonically; most other databases and libraries do the same. Treat them as case-insensitive when comparing.
Can I use a UUID as a session token?
A v4 UUID has 122 bits of entropy, which is more than enough to be unguessable as a session token. That said, dedicated session libraries also handle rotation, signing, and expiry, which a raw UUID does not. Use a UUID where you need a unique identifier; use a session library where you need a session.
Related tools
- Address Generator: Generate realistic random street addresses for form testing.
- API Key Generator: Produce random API keys in hex, base62, or UUID format.
- Bcrypt Generator: Hash a password with bcrypt and a tunable cost factor.
- Random String Generator: Generate random strings from any custom alphabet.
Related tools
ShotMark captures what you do here, in one click.
The traces, payloads, and tests you run by hand? ShotMark grabs the whole bug and hands it to your AI agent.