Back to All Tools

UUID Generator

Generate random UUID v4 identifiers.

100% Private — Your data never leaves your browser. Everything runs locally on your device.

Using the generator

Five UUIDs are already made when the page opens, in the standard format.

  1. Count — how many UUIDs to make, a whole number from 1 to 100. If you type a larger number, the tool makes 100 and shows a message that says so. An empty box, 0, a negative number or a decimal such as 2.7 gives no UUIDs, and a message under the button tells you what to fix.
  2. Format — pick one of four styles. You cannot combine them. For example, there is no uppercase with braces.
  3. Generate UUIDs — makes a new set and replaces the old one. Changing Count or Format does nothing until you press this button.
  4. Copy All — copies every UUID, one per line, with no commas or quotes. The button reads Copied! for a moment when it works.

This is what each format looks like:

FormatExampleLength
Standard (dashes)076abaa8-9f35-4d27-af84-178f8b95efdf36
No Dashes38f3004feebe4ccda535f9f28c5b560a32
Uppercase89FCE2C3-8DD6-4B0C-A80C-BD11CEC58FE136
With Braces{d22efbde-76fd-4fa8-bb9b-b24f715c7a5c}38

Use Standard unless a system asks for something else. The UUID standard (RFC 9562) says to write UUIDs in lowercase, and to accept either case when reading them. The braces style is common in Microsoft tools, where UUIDs are called GUIDs.

What is inside a version 4 UUID

A UUID is a 128-bit number written as 32 hex digits in groups of 8-4-4-4-12. This tool makes version 4 UUIDs, which are random. Only two digits are fixed:

076abaa8-9f35-4d27-af84-178f8b95efdf
              ^    ^
              |    variant: always 8, 9, a or b
              version: always 4

The 4 uses 4 bits and the variant digit uses 2 fixed bits. That leaves 122 random bits. We ran the tool's function 200,000 times. Every result matched this pattern, and 8, 9, a and b each appeared about a quarter of the time.

Where the randomness comes from

Each random digit comes from one byte of your browser's crypto.getRandomValues(). This is the same secure random source that password tools use, not Math.random(). The byte is reduced to a digit from 0 to 15 with a remainder. Because 256 divides evenly by 16, every digit is equally likely. The tool does not call the newer crypto.randomUUID(), but the results are the same kind of UUID.

Can two UUIDs ever be the same?

It is possible, but it is so unlikely that you can ignore it. There are 2122 version 4 UUIDs, about 5.3 × 1036. The chance of any repeat among n UUIDs is about:

chance ≈ n² ÷ (2 × 2122)
UUIDs madeChance of at least one repeat
1 millionabout 9.4 × 10-26
1 billionabout 9.4 × 10-20 (1 in 10 quintillion)
1 trillionabout 9.4 × 10-14
2.7 × 1018about 50%

To reach a 50% chance, you would need to make one billion UUIDs every second for about 86 years. In real systems, repeats come from bugs, not bad luck. For example, someone pastes the same UUID twice, or a program uses a weak random generator. So keep a unique constraint on the database column anyway.

When a UUID is a good choice

Things to watch out for

Frequently Asked Questions

Which UUID version does this tool generate?

Only version 4, the random kind. The 13th digit is always 4, and the first digit of the fourth group is always 8, 9, a or b. The tool does not make version 1 or version 7 UUIDs.

Is the randomness secure?

Yes. Each random digit comes from crypto.getRandomValues, the secure random source built into your browser, not from Math.random. Every digit from 0 to f is equally likely, and each UUID has 122 random bits.

How likely is a duplicate UUID?

Extremely unlikely. Among one billion UUIDs, the chance of any repeat is about 1 in 10 quintillion. You would need about 2.7 quintillion UUIDs for a 50% chance. Keep a unique constraint in your database anyway, because bugs can copy the same ID twice.

Can I use these UUIDs as database primary keys?

Yes. Store them in a native UUID type, such as uuid in PostgreSQL or BINARY(16) in MySQL, not as 36-character text. On very large tables, random keys can slow down inserts, and time-ordered version 7 UUIDs may suit better. This tool does not make version 7.

How many UUIDs can I make at once?

From 1 to 100 per click. If you type a larger number, the tool makes 100 and shows a message. Press Generate UUIDs again for another set, but copy the first set before you do, because the new set replaces it.

Are the UUIDs sent to a server or saved?

No. They are made by JavaScript in this page and are not sent or stored anywhere. After the page has loaded, the generator works without an internet connection.