Random String Generator
A random string generator creates unpredictable sequences of characters using cryptographically secure randomness. This tool uses the browser's built-in Web Crypto API (`crypto.getRandomValues`) to produce strings that are statistically uniform and suitable for security-sensitive applications such as tokens, API keys, session identifiers, and nonces.
You can customise the character pool by toggling uppercase letters (A-Z), lowercase letters (a-z), digits (0-9), and symbols. The length can range from 1 to 128 characters, and you can generate up to 50 strings at once. Each string guarantees at least one character from every selected set, and the result is shuffled with the Fisher-Yates algorithm to eliminate positional bias.
How it works
Uses `crypto.getRandomValues(Uint32Array)` to draw indices into a character pool built from the selected sets. Each character position is independently and uniformly sampled, then the array is shuffled with a crypto-secure Fisher-Yates pass: swap(i, randomInt(0..i)) for i from n-1 down to 1.
Use cases
- Generating secure API keys and access tokens for web services
- Creating random session IDs or CSRF tokens in web applications
- Producing test data with random identifiers for development and QA
- Generating one-time passwords (OTPs) or verification codes
- Creating random filenames or temporary directory names to avoid collisions