Random String Generator
Cryptographically secure random strings generated entirely in your browser using the Web Crypto API. No data is ever transmitted or stored.
Quick Presets
How to Generate Secure Random Strings
How to Generate Secure Random Strings
- 1 Choose a preset or configure manually
Select a preset (API Key, Token, Hex Token, Password, PIN) for instant configuration, or adjust length, character sets, and output format manually.
- 2 Set your character requirements
Toggle uppercase, lowercase, digits, and special characters on or off. Enable "Exclude ambiguous" to remove look-alike characters (0, O, 1, l). Enter a custom character set to override the toggles entirely.
- 3 Pick an output format
Choose Raw for general-purpose strings, Hex for hex-encoded secrets, Base64 for HTTP headers, or Base64-URL for URL-safe tokens and JWTs.
- 4 Generate and copy
Click Generate (or press Ctrl/Cmd+Enter) to produce a batch. Copy individual strings with the row copy button, copy all at once, or download as a .txt file.
Output format comparison
Output format comparison
| Format | Example (32 chars) | Output length | Characters | Use when |
|---|---|---|---|---|
| Raw | mK7#Rq2vLp9nXe4s… | = configured length | From active charset | General-purpose tokens, passwords |
| Hex | a3f8c2d1b04e7f9a… | 2× byte count | 0–9, a–f | Hex secrets, checksums |
| Base64 | o/jC0Z5L+eRwBq1Y… | ⌈4/3 × bytes⌉ | A–Z, a–z, 0–9, +, /, = | HTTP headers, JSON payloads |
| Base64-URL | o_jC0Z5L-eRwBq1Y… | ⌈4/3 × bytes⌉, no padding | A–Z, a–z, 0–9, -, _ | URL params, JWT secrets |