Random String Generator
Make random strings for API keys, session secrets, coupon codes, file names or test data. Pick the characters and length, and see how much randomness each string carries.
How to generate random strings
- 1Choose the length and the characters to use.
- 2Set how many strings you need.
- 3Copy them or download them as a text file.
Truly random
Values come from your browser's cryptographically secure random generator (crypto.getRandomValues), and characters are picked without modulo bias, so every character is equally likely.
How long is long enough?
For secrets like API keys aim for 128 bits or more: 32 hex characters, or 22 letters and digits. The bits of randomness are shown under the options.
Your own characters
Choose Custom to pick from any characters, for example ACGT for DNA-like test data or digits without 0 for codes.
Frequently asked questions
- Is anything sent to a server?
- No. Everything is computed in your browser and nothing leaves your device.
- Are repeated characters in a custom set a problem?
- No. Each different character counts once, so every character stays equally likely.
- Can I make a password here?
- Yes, but Password Generator makes sure each kind of character is included and Passphrase Generator makes memorable ones.