Random String Generator
Secure random strings from any character set.
62 possible characters · about 95 bits of entropy per string
Use via API
Random strings from chosen character sets (or a custom alphabet), each character drawn uniformly with a cryptographic random source. Send JSON, get JSON back.
POST https://pithlab.com/api/v1/tools/random-string-generator
curl https://pithlab.com/api/v1/tools/random-string-generator \
-H "Authorization: Bearer $PITHLAB_KEY" \
-H "Content-Type: application/json" \
-d '{"length":12,"count":3,"symbols":false}'About the Random String Generator
Generate random strings of letters, digits and symbols, or from your own alphabet. Uses your browser's secure random generator with no modulo bias.
How to use the Random String Generator
- Set the length of each string and how many you want.
- Choose the character types to include, or add your own characters.
- New strings are generated whenever you change an option. Press Generate for another batch.
- Copy the strings or download them as a text file, one per line.
Examples
Input
Digits plus custom characters abcdef
Output
0123456789abcdef (16 characters, 4 bits each)
Frequently asked questions
Are these strings secure enough for passwords or tokens?
Characters are chosen with crypto.getRandomValues, the browser's cryptographically secure generator, using rejection sampling so every character is equally likely. A 22-character alphanumeric string has about 130 bits of entropy.
How does the custom characters field work?
Any characters you type are added to the selected types, and duplicates are ignored. Untick all the types to use only your own alphabet, for example ACGT for DNA-like strings. Spaces are ignored.
Are the strings stored anywhere?
No. They are generated in your browser and never sent to a server, and a new set is made each time the page loads.