# JWT Key Generator

> Generate random JWT signing secrets for HS256, HS384 or HS512. Choose Base64, Base64 URL-safe or hex output and make 1 to 20 keys at once.

- Page: https://mondaytool.com/tools/jwt-key-generator
- Category: security
- Price: free, no sign-up. Most tools run in the browser, so input is not uploaded.
- Use it: open https://mondaytool.com/tools/jwt-key-generator. It is an interactive web page; this file is its documentation.

Last updated: 16 October 2026

## Generate secure JWT signing secrets

This **JWT key generator** creates random secrets for signing tokens with the HMAC algorithms HS256, HS384 and HS512. You choose the strength and the output format, and it makes up to 20 keys in one go. Each click produces a new, unrelated set.

## How to use it

1. Pick a **Key Strength**: 256-bit (32 bytes) for HS256, 384-bit (48 bytes) for HS384 or 512-bit (64 bytes) for HS512.
2. Pick an **Output Format**: Base64 URL-safe, Base64 or Hex.
3. Set the **Number of Keys** from 1 to 20. The default is 5.
4. Click **Generate Keys**.
5. Copy a single key with its button, or use **Copy All** to get them one per line.

## How it works

The tool asks the browser for random bytes with `crypto.getRandomValues()`, the same source used for cryptographic purposes, and encodes them in the format you chose. Base64 URL-safe swaps `+` and `/` for `-` and `_` and drops the padding. Hex gives two characters per byte, so a 32-byte key is 64 hex characters.

## Assumptions and limits

- These are shared secrets for HMAC signing (HS256, HS384, HS512). The tool does not generate RSA or ECDSA key pairs.
- Keys are not saved. If you leave the page or generate again, the old ones are gone, so copy what you need.
- The page says generation runs in your browser and nothing is sent to a server.
- Store secrets in an environment variable or a secrets manager, not in source code.

## Frequently asked questions

### Which strength should I choose?

Match it to the algorithm in your token header: 32 bytes for HS256, 48 for HS384, 64 for HS512. A key at least as long as the hash output is the usual guidance.

### Does the format change how strong the key is?

No. The same number of random bytes is used. The format only changes how the bytes are written as text. Use whichever your library or config file expects.

### Can I generate keys for RS256?

No. RS256 needs a public and private key pair, which this tool does not create.
