Random String Generator
Build random character strings for tokens, fixtures, and test IDs. This is not the password page. Symbols default to off.
Rated 4.7 out of 5 based on 378 reviews
How to generate a random string
- Set length from 1 to 256 and how many strings to print.
- Leave lowercase, uppercase, and numbers on for a typical alphanumeric token. Keep Symbols off unless the consumer allows punctuation.
- Generate. Each line is an independent string from the sets you left on.
- Copy what you need into a fixture or config. For a login secret, open the password generator instead.
Random alphanumeric token
Unbiased string from selected character sets
| Default alphabet | a-z, A-Z, and 0-9. Symbols off |
|---|---|
| Length | 1 to 256 characters |
| Sampling | Web Crypto rejection sampling per character |
| Not a password UI | No similar-character exclusions or require-each-set rules |
| Related secrets | Password and passphrase pages for login secrets |
| Related IDs | NanoID when you want a URL-friendly public ID |
Alphanumeric tokens, not login passwords
Use this page for dummy tokens, coupon codes, and test headers. It is not framed as an account password. The password generator adds exclusion options and can require every selected set. The passphrase generator prints memorable words. If you need a public URL id, prefer NanoID with a known alphabet.
Symbols stay off by default
Many APIs reject punctuation in tokens. Symbols stay unchecked until you turn them on. Lowercase, uppercase, and digits start on so a 16-character string is already a mixed alphanumeric value. Turn a set off if the consumer is case-sensitive in only one direction or forbids digits. At least one set must stay on.
How each character is chosen
The engine joins the sets you selected, then draws each character with rejection sampling so every remaining symbol is equally likely. Math.random is not used. Unlike the password page, this mode does not force one character from each set and does not shuffle a required prefix. Length is simply length.
Length, count, and local use
Length goes to 256. Count goes to 1000 lines. Generation stays in this tab. CZNull does not store the strings. Treat a long random string as sensitive if you later paste it into a real system. For short numeric PINs, use the PIN page under passwords, not this alphabet tool.
Collisions and uniqueness
This generator does not check that two lines differ. Independent samples can collide, especially at short lengths. If you need uniqueness in a database, enforce it there, or use a longer string, or switch to NanoID or UUID for identifier practice.