Skip to content

JWT encoder (signer)

Write the header and payload, pick an algorithm, add a secret or private key, and you have a signed JWT for testing. Signing runs on your browser's own WebCrypto engine, so the key never leaves your device.

  • Free, no limits
  • No sign-up
Everything happens in your browser; your data is never uploaded.
● Requests carrying your input: none · site files: 0 · analytics (no content): 0
Why is there no “save online” button?

Because server-side “save and share” keeps leaking. In November 2025, watchTowr researchers collected thousands of publicly reachable saved entries from two popular online formatters (jsonformatter.org and codebeautify.org), including passwords, API keys, tokens, and banking and government data. Here, everything runs in your browser; a shared link carries the data after the #, which browsers never send to the server. watchTowr Labs

  • ✓ Free
  • ✓ No sign-up
  • ✓ Nothing uploaded

Next step

What to do next

How to use it

  1. Choose the algorithm (HS256, RS256, ES256, EdDSA…).
  2. Write the payload in JSON; the iat and exp buttons set the issued-at and expiry times.
  3. Enter the secret (HS) or the private key as PEM or JWK.
  4. Click “Sign token,” then open it in the decoder or copy it.
Try it now

Which algorithm should you use?

AlgorithmKeyWhen
HS256/384/512shared secretthe same server issues and verifies
RS256/384/512RSA key pairwidespread; the OAuth/OpenID default
PS256/384/512RSA key pairthe modern (PSS) take on RS
ES256/384/512EC key pair (P-256/384/521)short signatures, fast
EdDSAEd25519 key pairthe most modern: fast and secure

For HS, RFC 7518 says the secret must be at least as long as the hash: 32 bytes for HS256. We warn you if it's shorter.

Key formats

Private keys can be PEM (-----BEGIN PRIVATE KEY-----, plus the older RSA PRIVATE KEY and EC PRIVATE KEY forms) or JWK. Make a test key locally with OpenSSL:

openssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:P-256 -out key.pem
openssl genpkey -algorithm ed25519 -out key.pem

We tested the engine against the RFC 7515 and RFC 8037 example tokens and against Node.js's own crypto: all 13 algorithms match in both directions.

Security

  • The key never goes into the shareable link, and we don't store it (not even in localStorage).
  • A JWT payload is not secret: anyone who gets the token can read it. Don't put passwords or card numbers in it.
  • Only use production keys when you must; make a separate key pair for testing.

Check the finished token in the JWT decoder with the public key.

Frequently asked questions

How do I create a JWT?

Enter the header, payload and key; the encoder Base64URL-encodes them and signs the result.

Is my key sent anywhere?

No. Signing happens in your browser's WebCrypto engine.

What key format does RS256 need?

PEM (PRIVATE KEY or RSA PRIVATE KEY) or JWK.

Does EdDSA work?

Yes. Ed25519 is supported in current Chrome, Firefox and Safari.

Sources

Recommended

Similar tools

If JWT encoder helped, you may need these too.

See all in category →

People also use