Random String Generator
Generate random strings
What Is This Tool?
The Random String Generator creates cryptographically random strings of a chosen length and character set, using your browser's crypto.getRandomValues API with rejection sampling to avoid bias. It's useful for generating tokens, test data, identifiers, or temporary codes — not just passwords.
How to Use
Set the length and how many strings you want to generate.
Choose which character types to include, or provide your own custom character set.
Click Generate, then copy individual strings, copy all, or download them as a file.
Features
- Uses crypto.getRandomValues with rejection sampling for unbiased randomness
- Configurable length and quantity (up to 20 strings at once)
- Toggle uppercase, lowercase, numbers, and symbols independently
- Optional custom character set overrides the checkboxes entirely
- Per-string copy buttons, plus Copy All and Download
- 100% client-side — nothing leaves your browser
Examples
16 characters, uppercase + lowercase + numbers: aZ3kLpQ9mN2vXyR8
Custom characters "ATCG", length 12: GATTACAGGCTA
Common Use Cases
- Generating test data or placeholder identifiers
- Creating one-time codes, invite codes, or short tokens
- Generating random values with a restricted custom alphabet
- Producing sample strings for QA or fuzz testing
Frequently Asked Questions
How is this different from the Password Generator?
This tool is a general-purpose random string generator: it supports a fully custom character set and generating multiple strings at once, and doesn't frame results as passwords or show a strength meter.
Is the randomness cryptographically secure?
Yes. It uses the Web Crypto API's crypto.getRandomValues with rejection sampling, which avoids the modulo bias that a naive Math.random()-based approach would introduce.
What happens if I set custom characters?
Filling in the custom characters field overrides the uppercase/lowercase/numbers/symbols checkboxes entirely, using exactly the characters you provide (duplicates increase that character's probability).
What's the maximum length and quantity?
Length is capped at 256 characters per string, and quantity is capped at 20 strings per generation, to keep the tool responsive.
Are the generated strings stored anywhere?
No. Strings are generated and held only in your browser's memory for the current session. Nothing is uploaded or logged.
Can I download all the generated strings at once?
Yes, click Download to save all currently generated strings as a plain text file, one per line.