KKwikfig.

UUID Generator

Generate bulk version-4 UUIDs — one or a hundred at a time — built directly from cryptographically secure random bytes with the RFC 4122 bits set for you. Runs entirely in your browser — your numbers never leave this device.

Single UUID (first of the set)
…
All 0 UUIDs

Each UUID is built directly from cryptographically secure random bytes (the Web Crypto API) with the version-4 and variant bits set per RFC 4122 — generated on your device, never sent anywhere.

How it works

Take 16 random bytes; set byte 6 to (byte AND 0x0F) OR 0x40 (version 4) and byte 8 to (byte AND 0x3F) OR 0x80 (variant 10); write the bytes as hex in the 8-4-4-4-12 grouping | 122 of the 128 bits stay random

A version-4 UUID is 128 bits of randomness wearing a small uniform. This generator draws 16 bytes from the browser's cryptographically secure random source — the same Web Crypto API the password generator uses — then stamps the two fixed patterns the standard requires: the high nibble of byte 6 becomes 0100, which is the version number 4, and the top two bits of byte 8 become 10, which marks the RFC 4122 variant. Those six fixed bits are why every v4 UUID has a 4 in the same position and an 8, 9, a or b in the next landmark position; the other 122 bits are pure chance.

The worked examples below show the stamping honestly, on byte streams you can inspect: sequential bytes and all-ones bytes go in, and you can see exactly which bits the version and variant stamps overwrite and which pass through untouched. Real generation uses random bytes, not sequences — the sequences exist so the algorithm can be verified digit for digit instead of trusted.

Bulk mode draws fresh bytes for every UUID, up to a hundred per click, with a copy-all button for test fixtures, database seeds and mock data. Nothing is generated server-side or logged: the UUIDs exist only in your tab, which also means closing the tab discards them — copy what you need first.

Worked examples

The version and variant stamps, byte by byte

Input
Bytes = 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
Working
Byte 6 starts as 0x06; keeping its low nibble and forcing the high nibble to 4 gives 0x46. Byte 8 starts as 0x08; keeping its low six bits and forcing the top bits to 10 gives 0x88. Every other byte passes through unchanged, and the hex is grouped 8-4-4-4-12.
Result
00010203-0405-4607-8809-0a0b0c0d0e0f

All-ones bytes: what the stamps overwrite

Input
Bytes = ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
Working
Byte 6 loses its high nibble to the version stamp (ff becomes 4f) and byte 8 loses its top two bits to the variant stamp (ff becomes bf). The remaining 122 bits stay 1 — a reminder of how little of a v4 UUID is structure and how much is randomness.
Result
ffffffff-ffff-4fff-bfff-ffffffffffff

Bulk generation from one continuous byte stream

Input
Count = 3, bytes drawn in sequence 00, 01, 02, …
Working
Each UUID consumes the next 16 bytes and gets the same two stamps: the second UUID starts at byte 0x10 (its byte 6, 0x16, becomes 0x46 and its byte 8, 0x18, becomes 0x98), and the third starts at 0x20 (0x26 → 0x46, 0x28 → 0xa8).
Result
00010203-0405-4607-8809-… · 10111213-1415-4617-9819-… · 20212223-2425-4627-a829-…

Frequently asked questions

What makes a UUID 'version 4'?

The version nibble. Six bits of every UUID are fixed by the standard: four say which generation scheme produced it (4 means 'random'), and two mark the layout variant. A v4 UUID is therefore recognisable on sight — the thirteenth hex digit is always 4 and the seventeenth is always 8, 9, a or b, exactly as the all-ones worked example shows (4f and bf after stamping).

Could two generated UUIDs ever collide?

In practice, no. With 122 random bits there are about 5 × 10^36 possible v4 UUIDs; you would need to generate billions per second for centuries before a collision became likely. That is the entire point of the design — IDs can be minted independently on different machines, offline, with no central registry, and still be treated as unique.

Is crypto.randomUUID not enough? Why build from bytes?

The native function is fine for one ID in code. Building from bytes here makes the algorithm visible and testable — the worked examples pin the exact bit-stamping with inspectable byte streams — and it makes bulk generation natural: a hundred UUIDs is just sixteen hundred bytes drawn from the same secure source.

UUID or GUID — is there a difference?

Not in substance. GUID is Microsoft's name for the same 128-bit identifier format, and a v4 GUID follows the same layout, stamps and grouping. The values this tool generates work anywhere a GUID is expected.

Are the UUIDs stored or sent anywhere?

No. They are generated in your browser from its own secure random source and exist only in the tab. There is no server round-trip and no history — reload the page and the set you generated is gone.

Related tools

More in Developer Tools · Browse all tools