UUID generator

Generate one or many UUIDs locally in your browser.

  • Runs locally
  • Free

Use the tool

Your files are processed in your browser and are not uploaded to a server.

About this tool

Generate one or many UUID v4 values locally in your browser, then copy or download the list. Uses secure browser randomness, suitable for database keys, test data and request IDs.

Typical uses

  • Create unique IDs for test data in bulk
  • Generate a primary key for a new record
  • Produce request tracing IDs

How to use

  1. Enter how many identifiers to generate.

  2. Generate UUID v4 values, then copy or download the list.

Good to know

Up to 1,000 values per run. Secure randomness needs browser API support on HTTPS or localhost.

How to read a UUID v4

Every result is 36 characters: 32 hexadecimal digits in five groups of 8-4-4-4-12, joined by hyphens. Taking 996456aa-8cf2-4a8d-ac3c-c4bca423a75a as an example:

GroupExampleMeaning
1996456aaRandom
28cf2Random
34a8dThe first digit is always 4, the version number for randomly generated UUIDs; it is character 15 of the string
4ac3cThe first digit is always 8, 9, a or b, marking the RFC 9562 variant; it is character 20
5c4bca423a75aRandom
  • Six of the 128 bits are fixed (4 version bits, 2 variant bits); the other 122 come from the browser’s secure random generator. Every result therefore matches ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$, which you can use to check whether a column of IDs is v4.
  • Browsers return lowercase hex, as the W3C Web Cryptography specification requires, and the tool does not change the case. RFC 9562 allows uppercase, lowercase or mixed, so normalize case before comparing or the same UUID can look like two.
  • The all-zero Nil UUID (00000000-0000-0000-0000-000000000000) and the all-ones Max UUID (ffffffff-ffff-ffff-ffff-ffffffffffff) are special values defined in RFC 9562. Their version digit is not 4, so this tool can never produce them; in data they usually mean “not set” or a placeholder.

Count rules and output format

“Count (1–1000)” must be a whole number from 1 to 1000. These are the actual results of typing each value and pressing “Generate UUID v4” (a refused count is shown as an error alert, which screen readers announce at once):

Count fieldResultNote
1Generated 1 UUID v4 value.The minimum; the message is worded for a single value
25Generated 25 UUID v4 values.Any whole number in range
1000Generated 1000 UUID v4 values.The maximum
1e3Generated 1000 UUID v4 values.Scientific notation is read as 1000
0Count must be 1–1000.A cleared field counts as 0
(empty)Count must be 1–1000.An empty field gives the same message
1001Count must be 1–1000.Over the limit; generate in two runs
2.5Count must be 1–1000.Decimals are refused
-3Count must be 1–1000.Negative numbers are refused
  • The result has one UUID per line, separated by a single line feed (LF), with no line break after the last one and no header. n UUIDs take 37n − 1 characters, so “Download” with 1000 values gives a uuids.txt of 36,999 bytes. Import it into a spreadsheet as a single column without a header row.
  • Each click replaces the whole list; nothing is appended. Changing the count clears the current result and shows “Input or options changed. Run again.”
  • For more than 1,000, run it several times and combine the lists. To confirm the combined list has no repeats, run it through the duplicate-line remover; in practice there will be none.

How unlikely a repeat really is

122 random bits allow about 5.3 × 10³⁶ values. By the birthday bound, the chance of at least one repeat among n random UUIDs is about n(n−1)/2 ÷ 2^122:

Number of UUIDsChance of at least one repeat
1,0009.4 × 10⁻³²
1 million9.4 × 10⁻²⁶
1 billion9.4 × 10⁻²⁰
1 trillion9.4 × 10⁻¹⁴
  • A 50% chance of a single repeat needs about 2.7 × 10¹⁸ UUIDs; at one billion per second that takes about 86 years.
  • This assumes good randomness. RFC 9562 section 6.9 says implementations should use a cryptographically secure pseudorandom number generator, which is what crypto.randomUUID(), the call this tool makes, does (MDN also describes it as using a cryptographically secure random number generator).
  • Real-world duplicates almost always come from copy-paste, a double import or code reusing one value, not from random collisions. Keep a unique constraint in the database anyway.

When a UUID v4 is the wrong choice

  • Do not use a UUID as a secret. RFC 9562 section 8 says UUIDs must not be used as security capabilities (identifiers whose mere possession grants access) and that implementations should not assume they are hard to guess. For tokens, passwords or one-time links use the password generator and make the value long enough.
  • Primary keys of large tables: v4 is fully random, so new rows land all over the index. RFC 9562 section 6.11 notes that time-ordered UUIDs give better database-index locality, and section 5.7 recommends UUIDv7 over v1 and v6 where possible. This tool makes only v4; generate v7 in your database or application code.
  • “Secure UUID generation is unavailable; use HTTPS.” The W3C specification marks randomUUID() as available only in secure contexts. A page opened over http:// or a browser without the method shows this message; on this site, served over HTTPS, you will not normally see it.
  • All UUIDs are generated in your browser, never sent to a server and never stored. Once the page is closed they are gone, so copy or download them first.

Sources

Frequently asked questions

How many at once?

Up to 1,000 per run.

Can UUIDs collide?

UUID v4 uses secure randomness, so collisions are vanishingly unlikely in practice.

Why is it unavailable?

Secure randomness requires browser support on an HTTPS or localhost page.