Works on this device
Random Identifier Generator
Make a random identifier in one step. Your browser makes it with its secure random generator, on your device. This page does not send or save it.
Choose your settings
Check these values
Identifiers are made in this browser. They are not sent to a server.
Your identifier will show here
Choose Generate to make one.
Generated on this device
How it was worked out
How to use the identifier generator
- Choose what to make: a random UUID, an identifier with your own length and characters, a short URL-safe identifier, a ULID or random bytes.
- Set the options, such as the length and how many to make. You can make up to 1,000 at a time.
- A new result shows each time you change an option. Choose Generate for a fresh one.
- Choose Copy text to copy the identifiers, or Download as text file to save them, one on each line.
The kinds of identifier
- UUID version 4: 128 bits written as 36 characters, such as
3f2b8c1e-9d4a-4f6b-8a2e-1c5d7e9f0a3b. 122 of the bits are random. The other 6 mark the version and the variant, as RFC 9562 defines. A GUID is the same thing under another name. - Chosen length and characters: you choose how long the identifier is and which characters it may use. Each character is picked with the same chance.
- Short URL-safe identifier: 21 characters from
A-Z,a-z,0-9,-and_. This is the form that the Nano ID library made popular. It holds 126 random bits. - ULID: 26 characters. The first 10 hold the time in milliseconds and the last 16 hold 80 random bits. ULIDs made later sort after ULIDs made earlier. The letters I, L, O and U are not used.
- Random bytes: plain random bytes, written in hexadecimal or as decimal numbers.
Random bits and the chance of a repeat
The page shows how many random bits one identifier holds. For an identifier of a chosen length the formula is: random bits = length × log2(number of characters). Each extra bit doubles the number of different identifiers.
Two random identifiers can be the same by chance. The birthday bound gives an estimate: with n identifiers out of N possible ones, the chance of at least one repeat is about 1 − exp(−n(n−1)/(2N)). About the square root of 2 × ln 2 × N identifiers give a 50% chance.
Under More options you can type how many identifiers you plan to make in total. The page then estimates the chance that two of them are the same.
Worked example
An identifier of 16 characters from letters and digits has 62 choices for each character. 16 × log2(62) is about 95.3 random bits. Among 1,000,000 such identifiers, the chance that two are the same is about 1 in 9.53 × 10^16.
A 6-digit number code has only about 19.9 random bits. Among 1,000 such codes the chance of a repeat is about 39.3%.
A version 4 UUID has 122 random bits. About 2.71 × 10^18 of them give a 50% chance of one repeat.
Limits you should know
- The page reports the random bits of an identifier. It does not say that an identifier is fit for a security use such as a password, a session token or an encryption key. That depends on your system and its rules.
- The estimate of repeats holds only when every identifier is made this way, with a good random generator. It is an approximation, not a promise.
- A ULID shows its creation time to anyone who has it. The time comes from the clock of your device. ULIDs made in one batch share one time and are not put in order among themselves.
- The page makes identifiers. It does not check them against a database, so it cannot know whether one is already in use in your system.
- To check a UUID, or to make time-ordered version 7 UUIDs, use the UUID Generator. For passwords and passphrases use the Password Generator.
- If your browser has no secure random generator, the tool stops and tells you. It never uses a weaker one.