Secret Key Generator for JWT
Secret Key Generator for JWT creates random key material as hex, Base64, Base64URL or alphanumeric text, with explicit length, prefix and count settings.
Secret Key Generator for JWT creates random key material as hex, Base64, Base64URL or alphanumeric text, with explicit length, prefix and count settings.
Secret Key Generator for JWT is a free token Tools utility that runs entirely in your browser — nothing you enter is uploaded.
How to use Secret Key Generator for JWT
- Choose Hex, Base64, Base64URL or Alphanumeric.
- Set Bytes/length and How many. For encoded formats the length is random bytes; for alphanumeric it is characters.
- Optionally enter a prefix, then choose Regenerate to create fresh random values.
- Copy the values and configure the receiving application’s key encoding consistently.
About this tool
Generates random values with crypto.getRandomValues and returns one value per line. Length means random bytes for hex, Base64 and Base64URL, or random characters for alphanumeric output. The prefix adds no random entropy. This generates key material, not a signed JWT, decoded claims or a verification result.
The tool permits 1–256 bytes or characters and 1–100 values per run; choosing a short length does not make a strong signing key. HS256 requires at least 256 bits of key material: 32 random bytes provide that amount before encoding. An alphanumeric choice has about 5.95 bits per random character, so use at least 43 random characters for a comparable entropy target. A recognizable prefix does not increase it.
Frequently asked questions
What does Secret Key Generator for JWT generate?
Generates random values with crypto.getRandomValues and returns one value per line. Length means random bytes for hex, Base64 and Base64URL, or random characters for alphanumeric output. The prefix adds no random entropy. This generates key material, not a signed JWT, decoded claims or a verification result.
Does it accept or decode a JWT?
No. Select the generation settings; no existing JWT is needed. The result is random key material, not a token header and payload.
What does Bytes/length mean?
Hex, Base64 and Base64URL encode that many random bytes. Alphanumeric produces that many random characters. Encoded output can be longer than the byte count.
Does a prefix improve key strength?
No. Only the randomly generated portion contributes random entropy. A fixed prefix labels the value but does not add randomness.
Can I paste the result into any JWT library?
Check the library’s key convention. Some APIs accept raw bytes and others accept text; Base64 decoding versus using the literal text produces different signing keys.