Random String Generator
Quick Presets
Overview
Crypto-secure random strings, generated in your browser
Cryptographically secure random strings generated entirely in your browser using the Web Crypto API. No data is ever transmitted or stored.
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, o, 1, l, I). Enter a custom character set to override the toggles entirely.
- 3 Pick an output format
Choose Raw for strings built from your character set. Hex, Base64 and Base64-URL instead encode the chosen number of random bytes — use them for hex secrets, HTTP headers, or URL-safe tokens and JWT secrets.
- 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 | Output length | Characters | Use when |
|---|---|---|---|---|
| Raw | mK7#Rq2vLp9nXe4s… | = configured length | From active charset | General-purpose tokens, passwords |
| Hex | a3f8c2d1b04e7f9a… | 2 × bytes | 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 |
For Hex, Base64 and Base64-URL, the length setting is the number of random bytes: 32 bytes give 64 hex characters, 44 Base64 characters or 43 Base64-URL characters (256 bits).