Developer

UUID Generator

Generate any number of v4 UUIDs.

UUIDs are generated entirely in your browser — never uploaded or stored.

What is this tool?

The UUID generator creates random UUID v4 values instantly — handy for database primary keys, API resource IDs, session tokens, or temporary filenames that need to be unique. Set a count and options, then press Generate.

Options
  • Count: generate 1 to 100 UUIDs at once.
  • Uppercase: lowercase (RFC 4122) by default; enable to display all uppercase.
  • Include hyphens: disable to output a continuous 32-character string without -.
Note: Values are generated with crypto.randomUUID() or crypto.getRandomValues() for cryptographically strong randomness.
Privacy & processing

Everything runs in your browser. Results are never uploaded or stored, and you can copy them all to your clipboard.

UUID v4's 128-bit layout — where the version and variant bits sit

A UUID v4 represents 128 bits as 32 hex digits (36 characters including 4 hyphens). Of those, 4 bits are a fixed version marker and 2 bits are a fixed variant marker — only the remaining 122 bits are random. Looking at this tool's actual generator code, bytes[6] = (bytes[6] & 0x0f) | 0x40 fixes the top 4 bits of byte 7 to 0100 (version 4), and bytes[8] = (bytes[8] & 0x3f) | 0x80 fixes the top 2 bits of byte 9 to 10 (RFC 4122 variant). In the resulting xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx layout, the first character of the third group is always 4, and the first character of the fourth group (y) is always one of 8, 9, a, or b.

How big is the collision odds, and v4 vs v7

122 bits of randomness means 2^122 ≈ 5.32×10^36 possible combinations. Using the birthday-paradox approximation, reaching a 50% chance of any collision takes roughly 2.71×10^18 UUIDs (2.71 quintillion). Even generating a billion per second nonstop, that would take about 86 years. No real-world system comes close to that volume, so v4 is treated as unique for all practical purposes.

Meanwhile, the newer UUID v7 standard embeds a millisecond timestamp up front, producing UUIDs that sort chronologically. v4's pure randomness means database index inserts land at scattered positions, hurting B-tree index performance, while v7's ordered generation avoids that. But because v7 exposes its creation time, v4 remains the better choice when you need to hide timing information. This tool only supports v4, the most widely used version.

What is a UUID?
A UUID (Universally Unique Identifier) is a 128-bit value that is, for practical purposes, unlikely to collide no matter where it's generated. It's widely used for database primary keys, session IDs, filenames, and API resource identifiers.
How is v4 different from other versions?
UUIDs come in several versions — time-based (v1), name-based (v3/v5), and random (v4). v4 fills most bits with cryptographically strong randomness, so it needs no input data or ordering yet still has extremely low collision odds, making it the most common choice.
Can generated UUIDs really never collide?
With 122 bits of randomness, even generating a billion per second makes a collision astronomically unlikely. It's not a mathematical guarantee, but in practice it's treated as unique.
Are uppercase and no-hyphen formats supported?
Yes. The default is lowercase with hyphens (e.g. 550e8400-e29b-41d4-a716-446655440000); you can toggle uppercase conversion and hyphen removal independently.
Are generated UUIDs sent to a server?
No. Generation uses the browser's built-in crypto API (window.crypto) entirely on your device; nothing is transmitted or stored.
Where are the version and variant bits in a UUID v4 string?
In the xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx layout, the first character of the third group is always version 4, and the first character of the fourth group (y) is always one of 8, 9, a, or b — the fixed variant bits. Only the remaining 122 bits are truly random.
How large is a 2^122 collision probability, really?
Using the birthday-paradox approximation, reaching a 50% collision probability requires about 2.71×10^18 UUIDs (2.71 quintillion). Even generating a billion per second nonstop would take roughly 86 years to get there.
How does UUID v7 differ from v4?
v4 is fully random, so inserting it into a database index scatters rows and can hurt performance, while v7 embeds a millisecond timestamp up front so values sort in generation order. But since v7 exposes its creation time, v4 is still preferable when timing needs to stay hidden; this tool supports only v4, the most widely used version.