Generate 128–512-bit cryptographic secret keys in hex, Base64, Base64URL, or Base58 using crypto.getRandomValues. Batch up to 20 keys at once.
Every JWT secret, AES session key, HMAC signing key, and OAuth client secret starts the same way: a block of random bytes pulled from the operating system's cryptographic RNG. This tool exposes that primitive directly, with no server and no account, so you can generate production-quality keys in the format your stack expects without reaching for a terminal.
Pick a bit length (128, 192, 256, 384, or 512), choose an encoding, set the batch size (1 to 20), and every value is generated fresh by crypto.getRandomValues. Click Regenerate at any time to get a new set. Each key has its own Copy button, and Copy all appears when you generate a batch of two or more.
The page itself never contains a key. The HTML arrives with an empty list and your browser fills it after loading, so no two visitors, and no search-engine copy of the page, ever share a value. Your settings are remembered between visits; the keys never are, and a reload draws new ones. Type a batch size outside 1 to 20 and the box says “Enter 1 to 20” and keeps the last valid count until you fix it.
+, /, and = padding. Used in HTTP headers, PEM files, and many backend frameworks.+ with - and / with _, and drops padding. Required for JWT payloads, PKCE code verifiers, and any key that appears in a URL or cookie without percent-encoding.An HS256 token is signed with HMAC-SHA-256, so its secret should be at least 256 bits. Choose 256-bit and Base64URL: each key is 43 characters, with no +, / or= to escape in an environment file. The same 32 random bytes come out as 64 characters in Hex, 44 in Base64 (one = of padding), and usually 43 or 44 in Base58, whose length varies with the value.
If you would rather generate it on the server, these give the same kind of key:
openssl rand -hex 32 prints 64 hex characterspython3 -c "import secrets; print(secrets.token_urlsafe(32))" prints 43 Base64URL charactersnode -e "console.log(require('crypto').randomBytes(32).toString('base64url'))" prints the same 43-character formKey strength
256-bit is the standard for AES-256, JWT secrets, and session tokens. 512-bit suits HMAC-SHA-512.
Encoding
Generating in your browser…
Keys are generated entirely in your browser using crypto.getRandomValues — a CSPRNG. Nothing is sent to a server. Never share or commit secret keys; rotate them if they are ever exposed.