Start a project

Tool 82 of 100 · Auth

JWT Encoder & Signer

Create signed JSON Web Tokens for testing with any common algorithm, using a secret or a generated key pair, and verify tokens against a public key or JWKS.

JWT Encoder & Signer at a glanceIllustration: 1, Header + claims; 2, processed in your browser; 3, A signed token.JWT Encoder & Signer{ }1Header + claims3A signed token2In yourbrowser
1 Header + claims 2 processed on your device 3 A signed token

JWT Encoder & Signer

Build

Signed token

Token
    Public key for verifiers (PEM and JWKS)

    Verify a token

      Decoded header and payload

      01

      What it does

      Builds JWT headers and claims, signs with HMAC, RSA, ECDSA or EdDSA through WebCrypto, and verifies tokens with time and audience checks.

      • HS256/384/512, RS256/384/512, PS256/384/512, ES256/384/512 and EdDSA
      • One-click iat, nbf, exp and jti claims
      • Test key pairs generated in the browser, with a JWKS
      • Verify against a secret, PEM, JWK or JWKS by kid

      02

      Private by design

      Everything happens in your browser. Nothing you type, paste or upload is sent anywhere, and it keeps working offline once the page has loaded.

      03

      What you get

      Signed tokens and public keys, with a Copy and a Download button on every result.

      • JWT
      • Auth
      • OAuth
      • WebCrypto

      Why it matters

      Testing an API that uses JWTs means making tokens: one that's expired, one with the wrong audience, one signed with a rotated key. Doing that with a script for each case is slow, and pasting real signing keys into websites is risky.

      This tool signs tokens with your browser's WebCrypto, so keys never leave the page, and can generate a throwaway key pair with a matching JWKS for your test server. The verifier applies the same checks a careful API should: signature, expiry, not-before, issuer and audience. The JWT Decoder reads tokens; this one creates and verifies them.

      How it works

      1. InputClaims and a secret or key
      2. In your browserSigned or verified with WebCrypto
      3. OutputA JWT, its public key and a verification report

      Where it fits in a designer's workflow

      1. Plan
      2. Design
      3. Build
      4. Test
      5. Launch
      Testing APIs and login flows.

      By the numbers

      Signature length for each algorithm, signed by the toolHS256: 43 characters; RS256: 342 characters; PS256: 342 characters; ES256: 86 characters; ES384: 128 characters; EdDSA: 86 charactersHS25643 charactersRS256342 charactersPS256342 charactersES25686 charactersES384128 charactersEdDSA86 characters
      Signed with this tool using freshly generated keys and the same small payload. RSA signatures are as long as the key (2048 bits), so RS256 tokens are much bigger than ES256 or EdDSA; HS256 is short but needs the same secret on every server. Source: RFC 7518: JWA; RFC 8037: EdDSA for JOSE.
      Show the numbers as a table
      AlgorithmSignature charactersToken characters
      HS25643105
      RS256342404
      PS256342404
      ES25686148
      ES384128190
      EdDSA86148

      How to use it

      1. Choose the algorithm.
      2. Edit the header and claims, using the buttons for times and IDs.
      3. Enter a secret, or generate a test key pair.
      4. Copy the token, or verify a token in the section below.

      FAQ

      Which algorithm should I use?

      ES256 or EdDSA for new systems: small tokens and fast. RS256 where clients need it. HS256 only when the same service signs and verifies.

      How long should an HS256 secret be?

      At least 32 random bytes. Short or guessable secrets can be cracked offline from a single token. The Random secret button makes a strong one.

      Is it safe to paste a production key?

      The key stays in your browser, but treat production signing keys as too sensitive for any website. Use test keys here.

      Why does verification say expired?

      The exp claim is in the past (with 30 seconds of allowed clock skew). Add a new exp with the buttons and sign again.

      Work with me

      Want a site that gets these right?

      I build fast, accessible websites and web apps that pass these checks from day one. Tell me about your project and I'll reply personally with honest next steps.

      All developer tools · Back to leej.uk