UUID generator

Create random UUID v4 identifiers, or sortable ULIDs, up to 100 at a time. They are generated with your browser's secure random generator and never leave your device.

How to use it

  1. Choose UUID v4 or ULID in Type.
  2. Set How many you need, from 1 to 100.
  3. Adjust the uppercase and hyphen options, then click Run.
  4. Click Copy or download the list.

UUID v4 and ULID explained

What a UUID and a ULID are

Almost every system needs identifiers: database rows, uploaded files, orders, sessions, log entries, test fixtures. Counting 1, 2, 3 works until several servers or offline apps create records at the same time and their numbers collide. A UUID (universally unique identifier) is a 128-bit value that any machine can generate on its own with no central counter, and still be practically sure that nobody else produced the same one. This tool creates version 4 UUIDs, which are random, and ULIDs, which are random but sort by creation time.

How they are built

A UUID v4 is written as 32 hexadecimal digits in the pattern 8-4-4-4-12, for example xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx. Of its 128 bits, 6 are fixed: the first digit of the third group is always 4 (the version) and the first digit of the fourth group is always 8, 9, a or b (the variant). The other 122 bits come from the browser's cryptographic generator. The tool uses crypto.randomUUID when the browser offers it and, otherwise, fills 16 secure random bytes and sets those fixed bits itself.

A ULID has 26 characters. The first 10 encode the current time in milliseconds and the last 16 are random (80 bits). The characters come from Crockford Base32, 0123456789ABCDEFGHJKMNPQRSTVWXYZ, which leaves out I, L, O and U so that they cannot be confused with 1 and 0 or form rude words. Because the time comes first, sorting ULIDs as text puts the older ones first. Each ULID in this tool gets its own fresh random part, so two ULIDs made in the same millisecond share the same first 10 characters but are not guaranteed to be in creation order between themselves.

Options

FieldEffect
TypeUUID v4 (random) or ULID (sortable by time)
How many (1 to 100)Number of identifiers, one per line
Uppercase (UUID)Writes the UUID in capital letters. ULIDs are always uppercase
Remove hyphens (UUID)Gives 32 characters with no dashes. ULIDs never have hyphens

The result appears in Generated IDs, can be copied, and can be downloaded as a file named ids.txt.

Worked example

  1. Choose UUID v4 (random), set How many (1 to 100) to 3 and click Run. You get three lines such as 3f2b8c1e-9a47-4d6e-b5c0-7e1a2d9f4c38. The values are different every time, but the shape never changes: 36 characters, hyphens after positions 8, 13, 18 and 23, a 4 starting the third group and 8, 9, a or b starting the fourth.
  2. Tick Remove hyphens (UUID) and run again. Each line now has 32 characters, convenient for file names or keys where dashes are awkward.
  3. Tick Uppercase (UUID) as well to get capitals. Systems that compare IDs as plain text should agree on one form, because ab12 and AB12 are different strings.
  4. Switch Type to ULID (sortable by time). Each line has 26 characters, for example starting with a prefix that grows as time passes. Generate again a few minutes later and the new prefix will sort after the old one.

When to use which

  • Use UUID v4 when you only need uniqueness and no information leaking about when the record was created.
  • Use ULID when the database index or a sorted list benefits from IDs that increase over time, as random UUIDs scatter new rows across an index.
  • The timestamp in a ULID is readable by anyone who knows the format, so it is not suitable when the creation time must stay private.

Tips and common mistakes

  • An identifier is not a secret. A UUID is hard to guess, but do not use it as a password or API key; use a proper secret generator for that.
  • Collisions are not a practical worry: with 122 random bits you would have to generate billions of UUIDs per second for many years to expect one repeat.
  • The list is made in your browser and never stored, so download or copy it before leaving the page.
  • Do not change the case or remove hyphens after your database has stored the IDs unless every system that reads them does the same.

Related tools

For other random values see the random number generator. To fingerprint text or files, use the hash generator, and to inspect tokens that carry identifiers, see the JWT decoder.

Questions

Are these UUIDs truly unique?

A v4 UUID has 122 random bits, so the chance of two matching is astronomically small. They come from the browser's cryptographic random generator.

What is a ULID?

A 26-character identifier whose first part is a millisecond timestamp, so ULIDs sort by creation time. It uses Crockford Base32, which avoids look-alike letters.

Can I use them as database keys?

Yes. Random v4 UUIDs can fragment some indexes. ULIDs, being time-ordered, are often friendlier for primary keys.

Are the IDs stored or sent anywhere?

No. They are created in your browser and disappear when you close the page.