🍋 Privacy & Security
Random String Generator
Generate cryptographically secure random strings
chars
words
sentences
lines
Generator Options
Results
Result
About Random String Generator
Generate random strings with customizable length, character sets, and formats. Uses Web Crypto API for true cryptographic randomness.
How It Works
Uses crypto.getRandomValues() to generate cryptographically secure random bytes, then maps them to your chosen character set using rejection sampling to ensure uniform distribution without modulo bias.
Step by Step
- 1 Set the desired string length
- 2 Choose a character set: alphanumeric, hex, base64, or custom
- 3 Click Generate to create random strings
- 4 Copy the result
Tips
- Use hex strings for tokens and session IDs
- Base64 strings are compact and URL-safe
- Custom character sets let you create specific formats
- Generate multiple strings at once for batch operations
Frequently Asked Questions
Is this truly random?
Yes. It uses the Web Crypto API which provides cryptographically secure pseudo-random numbers from your operating system's entropy pool.
What is rejection sampling?
A technique that discards random values outside the target range to avoid modulo bias. This ensures every character in your set has exactly equal probability.