Skip to content
cliplimeClipLime

Generate UUIDs

Random v4 or time ordered v7 UUIDs, one or ten thousand at a time, in the format you need.

Made in your browser, nothing is sent or stored

Generate UUIDs

Version

122 random bits. The usual choice when you just need a unique ID.

1 to 10,000

123e4567-e89b-42d3-a456-426614174000

Made with the secure random number generator in your browser. Nothing is sent or stored.

Read a UUID

Curly braces and urn:uuid: prefixes are fine. Shows the version, and the time inside versions 1, 6 and 7.

At a glance

Versions
Version 4 (random) and version 7 (time ordered, from RFC 9562), plus the nil and max UUIDs.
Bulk
Up to 10,000 at a time, as lines, comma separated, quoted lines or a JSON array, with a TXT download.
Formats
Standard, uppercase, no hyphens, braces, urn:uuid: and a 22 character Base64 URL form.
Randomness
The secure random generator built into your browser, never Math.random.
Ordering
Version 7 IDs made in the same millisecond still sort in the order they were created.
Reader
Paste any UUID to see its version and variant, and the time stored in versions 1, 6 and 7.
Privacy
UUIDs are made in your browser and are never sent or stored.

How to do it

  1. 1

    Choose a version

    Pick v4 for a random ID, or v7 if you want IDs that sort by creation time. A new one appears straight away.

  2. 2

    Set how many and the format

    Type a count up to 10,000, then choose the text format and, for lists, how to separate them.

  3. 3

    Copy or download

    Copy one UUID or the whole list, or download the list as a text file. Press Generate new for a fresh batch.

Version 4 or version 7?

A UUID is a 128-bit identifier, usually written as 32 hex digits in groups of 8, 4, 4, 4 and 12. Two versions cover almost every new use:

  • Version 4 is random. Six bits are fixed to mark the version and variant, and the other 122 bits come from the secure random generator. It tells you nothing about when it was made.
  • Version 7 starts with a 48-bit Unix timestamp in milliseconds, followed by random bits (74 of them, part of which this page uses as a counter). Newer IDs sort after older ones, so inserts land at the end of an index instead of all over it.

For a database primary key on a large table, version 7 usually keeps indexes smaller and inserts faster than version 4. The price is that the creation time is visible in the ID, so do not use it where that would give something away. Neither version is a secret: do not use a UUID as a password or an API key. A password generator is the right tool for that.

How unlikely is a collision?

A version 4 UUID has 122 random bits, which is about 5.3 undecillion possible values (5.3 followed by 36 zeros). By the birthday bound you would need to generate roughly 2.7 quintillion of them before the chance of any two matching reaches 50 percent. At a billion UUIDs a second that would take about 86 years.

In practice the maths is not the risk. A badly seeded random generator is, which is why this page never uses Math.random and takes every bit from the browser's cryptographic source.

Reading a UUID

You can tell the version by eye. In 123e4567-e89b-42d3-a456-426614174000 the first digit of the third group, 4, is the version. The first digit of the fourth group, a, shows the variant: 8, 9, a or b means the standard layout used today.

Version 1, 6 and 7 UUIDs carry a time. Paste one into Read a UUID to see when it was made. This is handy for checking when a record was created from its ID alone, and for confirming that version 7 IDs from your own system hold the time you expect.

Formats and where they are used

  • Standard: lowercase with hyphens, the form in most APIs and in PostgreSQL's uuid type.
  • Uppercase: common in Windows tools and SQL Server's uniqueidentifier.
  • No hyphens: 32 characters, used where hyphens are awkward, such as some file names. This is .NET's N format.
  • Braces: the Windows registry and COM style, .NET's B format.
  • URN: urn:uuid: followed by the standard form, the name-based form the UUID standards define.
  • Base64 URL: 22 characters with no padding, shorter in links and QR codes. The UUID is converted bit for bit, so it decodes back to the same value.

Whatever the text looks like, store UUIDs in a native uuid or 16-byte binary column when your database has one. Text storage takes more than twice the space.

Questions people ask

What is the difference between a UUID and a GUID?

Nothing in practice. GUID is the Microsoft name for the same 128-bit identifier. One difference to watch is that some Microsoft APIs store the first three fields in little-endian byte order, so the raw bytes of a GUID can look reordered.

Is a version 4 UUID really unique?

Not guaranteed, but a collision is so unlikely that it is ignored in practice. With 122 random bits you would need billions of UUIDs per second for decades to have a real chance of a duplicate.

Can I use a UUID as a secret token?

It is not a good idea. A random version 4 UUID from a secure source is hard to guess, but the standard does not promise that, and version 7 shows its creation time. Use a long random token from a password generator instead.

Which version is best for a database key?

Version 7 for large tables that grow over time, because sorted IDs keep inserts efficient. Version 4 is fine for small tables or when you do not want the creation time to show. Store either in a native UUID or binary column.

What are the nil and max UUIDs?

The nil UUID is all zeros, 00000000-0000-0000-0000-000000000000, used as an empty value. The max UUID is all ones, ffffffff-ffff-ffff-ffff-ffffffffffff. Both are defined in RFC 9562.

Are the UUIDs I generate stored or sent anywhere?

No. They are created in your browser when you load the page or press the button, and they disappear when you leave. Nothing is saved on a server or on your device.