How to use it
- Choose the kind: version 4, version 7 or ULID.
- Enter how many you need, from 1 to 10,000, and the form: capitals, hyphens, braces.
- Select “Generate” for a new list.
- Copy the list or download it as a text file, one ID per line.
Rules and limits
How the IDs are made
- Every random bit comes from your browser’s cryptographic random generator (
crypto.getRandomValues); nothing is sent or stored. - Version 4 (RFC 9562, section 5.4): 122 random bits, the version digit
4and the variant bits10, so the first digit of the fourth group is8,9,aorb. - Version 7 (RFC 9562, section 5.7): the first 48 bits are the Unix time in milliseconds. In the same millisecond the IDs count up: the next 42 bits are a counter that starts at a random number in each new millisecond (section 6.2, method 1), the last 32 bits are random. A list is therefore in order and sorts by time, also across the lists made while the page is open.
- ULID: 48 bits of milliseconds and 80 random bits, written in Crockford Base32 as 26 capitals; in the same millisecond the random part counts up by one, as the ULID specification describes.
- Capitals, hyphens and braces change only the written form; UUID readers accept all of them.
Limits
- Tested in Chrome on a laptop: 10,000 version 7 UUIDs in 36 ms.
- Up to 10,000 IDs at once; select “Generate” again for more, and version 7 and ULIDs continue the order.
Questions and answers
Version 4 or version 7?
Version 7 starts with the moment it was made, so new IDs sort after old ones: database indexes stay compact, and you can see when a row was created. Version 4 says nothing about its time; use it when that must not show.
Can two of these UUIDs be the same?
Practically never: a version 4 UUID holds 122 random bits, so among a billion of them the chance that any two are equal is about 1 in 10^19. Version 7 adds the time and a counter, which keeps the IDs made in one browser apart.
Can a UUID be used as a secret?
No. A UUID is unique, not secret, and version 7 even shows when it was made. For passwords, keys or private links use a value made for that, such as a long random password.
What is a ULID?
A 128-bit ID like a UUID, written as 26 characters: the first 10 hold the time in milliseconds, the other 16 are random. Like version 7 it sorts by time, and it is shorter and has no hyphens.