UUID generator

UUID v4 and v7, ULID and NanoID-style IDs in bulk, ready to copy or download.

122 random bits. The usual choice when order does not matter.

1 to 1000

Format

What this tool does

It makes unique identifiers on your device, as many as you ask for, and lets you copy them or save them as a file. Four kinds are available: UUID v4, which is 122 random bits; UUID v7, which starts with the current time so that newer IDs sort after older ones; ULID, a 26-character, time-sortable alternative; and a NanoID-style string, which is short, random and safe to put in a URL. The random numbers come from your browser's cryptographic generator, the same one used for passwords, and nothing is sent anywhere.

Which kind should I pick?

  • UUID v4 is the default choice. It is supported by every database, language and framework, and a collision is not a practical concern: you would have to create about 2.7 quintillion of them before the chance of a duplicate reached 50%, which at a billion per second takes roughly 86 years.
  • UUID v7 is the better key for a database table. A v4 key lands at a random place in an index every time, which fragments it and slows inserts down; a v7 key starts with a 48-bit Unix timestamp in milliseconds, so new rows append at the end. IDs made in the same millisecond are counted up, so a bulk list stays sorted.
  • ULID carries the same idea as v7 in 26 characters of Crockford base32 (no I, L, O or U, so it is hard to misread), and sorts alphabetically by time.
  • NanoID style is for short public identifiers such as links and invitation codes. The default of 21 characters from a 64-character alphabet gives 126 bits, about as much as a UUID, in fewer characters.

Reading a UUID

A UUID is 32 hexadecimal digits written as 8-4-4-4-12. Two positions carry meaning. The first digit of the third group is the version, so 4 or 7. The first digit of the fourth group is the variant, and for every UUID in use today it is 8, 9, a or b.

In a v7 UUID the first 12 digits are the timestamp. The example in the standard, RFC 9562, is 017f22e2-79b0-7cc3-98c4-dc0c0c07398f. Its first 48 bits, 017f22e279b0, are 1,645,557,742,000 milliseconds after 1 January 1970, which is 22 February 2022, 19:22:22 UTC. The 7 after the second hyphen is the version, cc3 is 12 random bits, and 9 starts the variant. A ULID shows its time in its first 10 characters: 01ARZ3NDEK is 1,469,922,850,259 ms, 30 July 2016.

Formats

Windows, .NET and many registries write a GUID in capitals, sometimes inside braces: {550E8400-E29B-41D4-A716-446655440000}. Databases such as PostgreSQL accept the plain lower-case form, and some systems store the 32 digits without hyphens. The checkboxes switch between these; the ID itself is the same. A ULID is conventionally written in capitals, but it is case-insensitive.

Saving a list

Ask for up to 1000 IDs and press "Copy all" to put them on the clipboard one per line, or download a TXT file (one ID per line) or a CSV file with an id header, ready to import into a spreadsheet or a seed script. Press "Generate again" for a fresh batch.

Good to know

  • An ID is not a secret. UUID v7, ULID and anything else that starts with a time reveals when it was created, so do not use them as a password or a reset token. For that, use a password generator.
  • A random ID is unique with overwhelming probability, not with certainty. If uniqueness matters, keep a unique index in the database as well.
  • The tool makes IDs and does not check them. To compare two lists of IDs, the diff checker works well.

Frequently asked questions

Are these UUIDs really unique?

A v4 UUID has 122 random bits from your browser's cryptographic generator, so a duplicate is not a practical concern. A v7 UUID adds the current millisecond and a counter. Keep a unique constraint in your database anyway.

What is the difference between UUID v4 and v7?

v4 is fully random. v7 begins with a 48-bit timestamp in milliseconds and then random bits, so IDs sort by creation time. That keeps database indexes compact and makes the newest rows easy to find.

Is a GUID the same as a UUID?

Yes. GUID is the name Microsoft uses; the format is the same. Tick Uppercase and Braces for the style Windows tools show.

Is my ID sent to a server?

No. Everything is generated in your browser and nothing is uploaded or stored.

How many IDs can I generate at once?

Up to 1000 per batch. Press Generate again for another batch, or download the file.