Random string generator
Generate random strings from letters, digits and symbols – one or up to 100 at a time. Use them as IDs, test data, coupon codes or tokens. Generated locally in your browser.
- 100% free
- No signup
- Runs in your browser
How to use
- Enter the length of each string and how many strings you need (up to 100).
- Select the character types to use and, if the strings will be read or typed by people, exclude look-alike characters.
- Click Generate and copy the strings from the result box – one string per line.
How many strings are possible
Every character is picked independently and uniformly from the selected characters using the browser’s cryptographic random generator. With an alphabet of n characters and a length of L there are n^L possible strings.
Letters and digits give 62 characters. An 8-character string then has about 218 trillion possibilities, and a 22-character string has more combinations than a 128-bit UUID.
When you generate many strings, the chance of two identical ones depends on the number of possibilities. For short codes of 4–5 characters, check the list for duplicates before you use it.
Possible strings by length
| Characters and length | Possible strings |
|---|---|
| Digits, 6 characters | 10⁶ |
| Uppercase letters, 6 characters | 26⁶ ≈ 3.1 × 10⁸ |
| Letters and digits, 8 characters | 62⁸ ≈ 2.2 × 10¹⁴ |
| Letters and digits, 16 characters | 62¹⁶ ≈ 4.8 × 10²⁸ |
Examples
| Example | Result |
|---|---|
| Length 8, uppercase letters and digits, 10 strings | Coupon or voucher codes such as Q7KX2M9P |
| Length 32, letters and digits | An API key or session token |
| Length 6, uppercase letters and digits, no look-alikes | Codes that are easy to read and type, without 0/O or 1/I |