Random String Generator
Generate cryptographically secure random strings with your choice of length and character sets, optionally excluding look-alike characters.
1 to 4,096 characters.
For lengths above 128.
1 to 20.
How it works
- Choose a length and which character sets to draw from.
- Every character comes from your browser’s cryptographically secure random source.
- The entropy shown is the exact length × log₂(pool size).
Frequently Asked Questions
Is this suitable for passwords and API keys?
Yes. Every character comes from crypto.getRandomValues() with rejection sampling, so the distribution is uniform and unpredictable. The reported entropy is the exact length x log2(pool size).
What does "exclude ambiguous characters" do?
It removes characters people mis-transcribe from a screen or printout — O and 0, l, I and 1, and the confusable pairs 5/S, 2/Z, 8/B. Excluding them shrinks the pool slightly, and the entropy figure updates to match.
What does "require each character set" mean?
It guarantees at least one character from every set you enabled, which some systems demand. This makes the sampling slightly non-uniform, so the entropy is then reported as an upper bound rather than an exact figure.
Is Math.random() used anywhere?
No. There is one random source in this entire site, and it is the Web Crypto API.