JWT Encoder

Create and sign JSON Web Tokens. Supports HS256, RS256, ES256, EdDSA and more. All signing runs in your browser.

Home/Tools/JWT Encoder
Loading…

How to Encode a JWT

  1. Choose an algorithm from the dropdown (HS256 is a good default)
  2. Edit the Payload JSON with your claims
  3. Enter your secret (for HMAC) or paste a PEM private key (for RSA / EC / EdDSA)
  4. The signed token appears immediately on the right — copy and use it

Supported Algorithms

  • none — Unsecured JWT, no signature (not for production)
  • HMAC — HS256, HS384, HS512: shared secret, fast and simple
  • RSA — RS256, RS384, RS512: private key to sign, public key to verify
  • ECDSA — ES256, ES384, ES512: elliptic-curve alternative to RSA
  • RSA-PSS — PS256, PS384, PS512: probabilistic RSA signing
  • OKP — EdDSA: Ed25519 / Ed448 curve-based signing

Is my data safe?

Yes. All signing runs 100% in your browser via the Web Crypto API. No tokens, secrets, or keys are ever sent to any server.

FAQ

Which algorithm should I use?

HS256 is the most common choice for symmetric signing using a shared secret. RS256 or ES256 are better for asymmetric scenarios where the signer and verifier are different parties. EdDSA (Ed25519) is a modern, high-performance alternative to RSA.

Is it safe to sign a JWT here?

Yes. All signing runs entirely in your browser via the Web Crypto API. Your secret, private key, and payload are never sent to any server.

What claims should I put in the payload?

Common claims include sub (subject / user ID), iss (issuer), aud (audience), exp (expiry as Unix timestamp), and iat (issued at). You can add any custom claims your application needs.

What is the difference between HS256 and RS256?

HS256 uses a single shared secret to both sign and verify the token. RS256 uses a private key to sign and a public key to verify — safer in distributed systems because verifiers only need the public key, not the secret.