UUID Generator

Random version 4 UUIDs (GUIDs), generated locally.

Choosing a count and a format

  1. Type how many identifiers you need in the "How many" box. The tool accepts 1 to 500; a larger number is capped at 500 and an empty or zero value falls back to 1.
  2. Choose the format you want: Uppercase, No hyphens and Braces can be combined freely. The list is regenerated whenever you change a box, so you do not have to press anything.
  3. Press Generate for a fresh batch with the same settings, then Copy all to put the whole list on the clipboard, one UUID per line.

Note that every change of an option creates brand-new values rather than re-formatting the old ones. If you need the same identifier in two formats, copy it first and convert it in your editor.

In short

A version 4 UUID is 122 random bits with two fixed digits that mark the version and variant. The tool uses your browser's secure random generator, and the chance of two random UUIDs matching is small enough to ignore for keys, test data and file names.

Frequently asked questions

How random are these?

They come from your browser’s cryptographically secure generator (crypto.getRandomValues).

UUID or GUID?

Same thing — GUID is the term used in Microsoft environments.

Can I get the same UUID twice by pressing Generate again?

No, each press draws new random bits. If you need to reproduce a value, copy it before regenerating, because the page does not store history.

Why does every UUID have an 8, 9, a or b after the third hyphen?

That digit marks the variant defined by the UUID standard. Every v4 UUID carries one of those four characters there, so seeing them is a sign the output is correctly formed.

Our test: do the modern and the fallback method both give clean v4 UUIDs?

With How many set to 500, Generate was pressed 2,000 times in headless Chromium 153.0.8010.12, collecting 1,000,000 UUIDs. Chromium provides crypto.randomUUID(), so this run used the modern path. We then reloaded the page with crypto.randomUUID removed, simulating an older browser, so the page had to use its own fallback code, and collected another 1,000,000. For each set we checked the format, the version digit, the variant digit, duplicates, and how often each hex digit appeared in the 30 fully random positions.

Modern pathFallback path8249,447249,3149250,458249,842a250,515250,903b249,580249,941
Variant digit out of 1,000,000 UUIDs (expected 250,000 each) — chart drawn from the table below.
Variant digitModern pathFallback path
8249,447249,314
9250,458249,842
a250,515250,903
b249,580249,941

Both sets had zero duplicates, zero malformed values and a 4 in the version position every time. In the random positions each hex digit was expected 62,500 times per position; the counts ranged from 61,838 to 63,233 on the modern path and from 61,873 to 63,338 on the fallback path, within about 1.4% either way.

What it means: whichever method your browser ends up using, the output has the same layout and the same even spread, so UUIDs made in an older browser can sit next to newer ones with no difference in format or spread that our test could find.

More details

What is a UUID?

A UUID is a 128-bit identifier written as 32 hexadecimal digits in five groups, like 123e4567-e89b-42d3-a456-426614174000. Version 4 UUIDs are random, so the chance of two ever matching is negligible. Developers use them as database keys, file names and request IDs.

The version and variant digits in a v4 UUID

A UUID is 128 bits, shown as 32 hexadecimal digits grouped 8-4-4-4-12. In a version 4 UUID most of those bits are random, but two fields are fixed so that software can recognize the type. The first digit of the third group is always 4 (the version), and the first digit of the fourth group is always one of 8, 9, a or b (the variant). That leaves 122 random bits.

Take f47ac10b-58cc-4372-a567-0e02b2c3d479. The third group starts with 4 and the fourth with a, so it is a valid v4 UUID. If you ever see a different digit in those positions, the value came from some other version or generator.

This page asks the browser for crypto.randomUUID() when it exists. In older browsers it falls back to filling 16 bytes with crypto.getRandomValues and then setting the version and variant bits by hand, which produces the same layout. This tool does not send anything anywhere, and it keeps no list of earlier results.

Collision odds for random 122-bit values

With 122 random bits there are about 5.3 × 1036 possible values. Because of the birthday effect, you would need to generate on the order of 261 (roughly 2.3 × 1018) UUIDs before the chance of any two matching reaches one half. For a table of a few million rows the probability of a collision is extremely small, so most systems simply treat v4 UUIDs as unique. A database unique constraint is still a sensible safety net, because it adds almost no overhead and catches bugs such as copying the same value twice.

Keys, test data, log IDs and file names

  • Primary keys that can be created on the client or on several servers without asking a central counter for the next number.
  • Test data and fixtures: paste 50 identifiers into a seed file or a spreadsheet column.
  • Correlation or request IDs attached to log lines so one user action can be traced across services.
  • Unique file names for uploads, which avoids collisions and does not reveal the original name.
  • Windows and .NET work: the Braces option gives the {...} form that registry files, installer projects and some configuration files expect; they usually call the value a GUID.

Lowercase, uppercase and no-hyphen forms

The standard textual form is lowercase with hyphens, and that is what most libraries print and parse. Uppercase is the same number, just written differently; comparisons should be case-insensitive or you should normalize to one case before storing. The no-hyphen form is 32 characters and is handy for URLs, file names or systems that dislike dashes, but check that the receiving code accepts it, because strict parsers sometimes demand the hyphens.

Security, index order and what a UUID reveals

  • A UUID is an identifier, not a secret. Do not use one as a password or as the only protection of a private link; use a purpose-built token generator for that.
  • Random UUIDs have no order. In some databases, inserting random keys into an indexed column scatters writes across the index and can be slower than sequential keys. Newer time-ordered UUID versions exist for that case; this tool only makes version 4.
  • Version 4 contains no timestamp, no machine address and no name, so a UUID reveals nothing about when or where it was created.
  • The output box is read-only. Edit the copied text elsewhere if you need to tweak it.

More questions

Do I need the Braces option?

Only if the system you are pasting into expects the curly-brace form that many Windows tools use for GUIDs. Most libraries and databases want the plain hyphenated form.

Related guides

More in Text & developer