UG
UUID Generator
Generate cryptographically random UUID v4 identifiers, one or a hundred at a time.
More Developer Tools Tools
How to Use UUID Generator
Choose how many UUIDs you need (1-100), pick uppercase or lowercase and whether to keep the hyphens, and press Generate. Every UUID is created with your browser's native `crypto.randomUUID()` — no external library, no server round-trip. Copy the whole batch with one click, one identifier per line.
About UUID Generator
A UUID (Universally Unique Identifier) is a 128-bit value used to identify something — a database row, a session, a file, an API request — without needing a central authority to hand out sequential numbers. The version generated here, version 4, is the most common variant in everyday use: almost the entire 128 bits are filled with cryptographically random data, with a handful of fixed bits reserved to mark the UUID as version 4 and to set its "variant" field. A v4 UUID always looks like `xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`, where the `4` is fixed (marking the version) and `y` is one of `8`, `9`, `a`, or `b` (marking the variant) — every other character is random hexadecimal.
The practical reason UUIDs exist is coordination-free uniqueness. If two completely independent systems each generate a random UUID v4, the odds of them colliding are so astronomically small that it is treated as effectively impossible in real-world engineering — there are 2^122 possible values (the 6 fixed bits aside), which is roughly 5.3 undecillion (5.3 × 10^36). To put that in perspective, you would need to generate around a billion UUIDs every second for about 85 years before the probability of any collision reached even one in a billion. This is why UUIDs are used so widely for primary keys, distributed system identifiers, and anywhere multiple machines need to create IDs independently without talking to each other first.
This generator uses `crypto.randomUUID()`, a method built directly into modern browsers (and Node.js) that produces version 4 UUIDs using the browser's cryptographically secure random number generator — the same underlying randomness source used for things like generating encryption keys, not the weaker `Math.random()` that many hand-rolled UUID implementations mistakenly rely on. Because the browser provides this natively, there is no external UUID library involved and no chance of a flawed random-number implementation undermining the uniqueness guarantee.
UUIDs are not sortable by creation time — because the value is almost entirely random, generating a thousand UUID v4s tells you nothing about the order they were created in, which is one of the main reasons the ULID format (also available in this Developer Tools category) exists as an alternative when you need both uniqueness and chronological ordering, such as for database primary keys you want to insert in roughly time order.
Details & Tips
Structure of a UUID v4, broken into its five hyphen-separated groups (8-4-4-4-12 hex characters, 36 characters total including hyphens): the first group (8 chars) and second group (4 chars) are fully random. The third group starts with a fixed `4` (marking version 4) followed by 3 random characters. The fourth group starts with one of `8`, `9`, `a`, or `b` (marking the RFC 4122 variant) followed by 3 random characters. The fifth group (12 chars) is fully random. In total, 122 of the 128 bits are random; the remaining 6 bits are fixed to identify the version and variant, which is why the collision-probability maths above uses 2^122 rather than the full 2^128.
Formatting options this tool offers: hyphens can be toggled off if your target system expects a 32-character string with no separators (some databases and APIs store UUIDs this way to save 4 bytes of storage per row); case can be toggled between the conventional lowercase and uppercase, though the value is identical either way — UUIDs are case-insensitive by specification, uppercase is purely a display preference some systems favour.
When to use UUID v4 versus alternatives: UUID v4 is the right default whenever you need a globally unique, hard-to-guess identifier and do not care about sort order — API keys, session tokens (though these usually warrant a longer random value), one-off resource identifiers, distributed system correlation IDs. If you need IDs that sort in creation order (useful for database clustered-index performance and for eyeballing "which record came first"), use the ULID generator instead, which encodes a timestamp into the first part of the identifier while keeping the same collision-resistance guarantees for the rest. If you need a short, human-typeable code (like a 6-character invite code), a UUID is the wrong tool entirely — it is far longer than needed and not designed to be read aloud or typed by hand.
A note on randomness quality: `crypto.randomUUID()` draws from the operating system's cryptographically secure random number generator, the same source used for TLS keys and other security-critical randomness. This matters because a UUID generator built on `Math.random()` (a common shortcut in hand-rolled implementations) is not cryptographically secure and can, in principle, have its output predicted — irrelevant for most uses of UUIDs as plain identifiers, but worth knowing if you are ever tempted to use a UUID as a secret token rather than just an identifier.
Frequently Asked Questions
What is a UUID used for?
UUIDs identify records, sessions, requests, or resources uniquely without needing a central system to hand out sequential numbers — commonly used as database primary keys, API tokens, correlation IDs, and file identifiers.
How random is a UUID v4, really?
122 of its 128 bits are random, giving roughly 5.3 undecillion (5.3 × 10^36) possible values. Even generating a billion UUIDs per second, it would take around 85 years before the chance of any collision reached even one in a billion.
Can two UUID v4s ever collide?
Mathematically, yes — the space of possible values is finite, so a collision isn't literally impossible. In practice it is so improbable that virtually every engineering system treats UUID v4 collisions as a non-issue, on the same order of unlikeliness as a hardware failure caused by a cosmic ray flipping a bit.
What library does this tool use to generate UUIDs?
None — it calls `crypto.randomUUID()`, a method built directly into modern browsers, which generates a version 4 UUID using the browser's cryptographically secure random number generator.
Are UUIDs case-sensitive?
No, by specification a UUID is case-insensitive — `a1b2c3d4` and `A1B2C3D4` refer to the identical value. This tool's uppercase/lowercase toggle is purely a formatting preference for how it displays.
Should I remove the hyphens?
Only if your target system requires it. Most databases and APIs accept the standard hyphenated 36-character format; a few store UUIDs as a compact 32-character string without hyphens to save storage space. Use the "Include hyphens" toggle to match what you need.
Is a UUID the same as a GUID?
Effectively yes — GUID (Globally Unique Identifier) is Microsoft's name for the same underlying concept and format as a UUID. UUID v4s generated here are valid GUIDs.
Are UUIDs sortable by when they were created?
No, UUID v4 values are essentially random and carry no time information, so a batch generated together will not sort into creation order. If you need that, use the ULID generator instead, which encodes a timestamp in its first characters.
Can I use a UUID as a secret or password?
A UUID v4 has enough entropy to be hard to guess, but it is designed and typically used as a public identifier, not a secret — many systems log, display, or embed UUIDs in URLs. Use a dedicated secret-generation method for anything meant to stay confidential.
Does this tool store or transmit the UUIDs I generate?
No. Generation happens entirely client-side with `crypto.randomUUID()` — nothing is sent to a server or logged anywhere.
Part of These Collections
Also Available As
uuid generator, guid generator, uuid v4 generator, random uuid online, generate uuid, bulk uuid generator
Found a Problem?
Let us know if something with UUID Generator isn't working as expected.
Something went wrong. Please try again.
Thanks — we'll take a look.