go-supertools
Developer & Data Tools

JWT Decoder, Verifier & Signer

Decode a JSON Web Token, verify its signature, or create and sign your own, all in your browser.

Runs in your browser Your input never leaves your device.

Tokens and keys stay in your browser and are never sent anywhere. Even so, use test keys: do not paste a production private key into any web page.

    Report a problem with this tool

    About this tool

    This tool does three things with JSON Web Tokens. Decode shows the header and payload as formatted JSON and explains the time claims: exp (expired or how long is left), nbf (not valid yet) and iat (issued when). Verify checks the signature with HS256/384/512 (a shared secret in text, hex, base64 or base64url), RS256/384/512 and PS256/384/512 (an RSA public key), ES256/384/512 (an elliptic-curve key on P-256, P-384 or P-521) or EdDSA (Ed25519, where your browser supports it). Create & sign builds a token from a header and payload you edit, signs it with your key, and can generate a throw-away demo key pair. Keys can be PEM public keys, certificates, PKCS#8 or RSA private keys, or JWK and JWKS (the key is picked by the token's kid). Some rules are built in because JWT mistakes are a classic security hole: a token with alg none is never accepted as valid; the algorithm is chosen by you and must match the token, so an attacker cannot make a verifier use a weaker one or treat an RSA public key as an HMAC secret; and a key of the wrong type or curve is refused with a message. A valid signature only proves the token was made with that key and not altered. It does not mean you should trust it: also check iss, aud and the time claims in your own code. Everything runs in your browser with WebCrypto. Encrypted tokens (JWE, five parts) and encrypted or SEC1 'EC PRIVATE KEY' files are not supported. Even though nothing is uploaded, use test keys here, not production private keys.

    How to use it

    1. Paste a token in the Token box to decode it. The claims below show whether it has expired.
    2. To check the signature, open Verify, pick the algorithm that the token uses, paste the secret or public key, and press Verify.
    3. To make a token, open Create & sign, edit the header and payload, choose an algorithm and key (or generate a demo key pair), and press Sign.
    4. Use Verify this token to check what you just made with the matching key.

    Example

    Input
    eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
    Result
    HEADER:
    {
      "alg": "HS256",
      "typ": "JWT"
    }
    
    PAYLOAD:
    {
      "sub": "1234567890",
      "name": "John Doe",
      "iat": 1516239022
    }
    
    Signature: SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c — not verified (no secret).

    Common problems

    It says the algorithms do not match
    You must choose the algorithm that the token's header names. This is deliberate: letting a token pick its own algorithm is a known attack.
    The signature is not valid but I used the right key
    Check the key is the one that signed it (not another environment's), that an HS secret is entered in the right format (text, hex or base64), and that the token was not copied with extra spaces or line breaks.
    My EC private key is rejected
    Files starting 'BEGIN EC PRIVATE KEY' (SEC1) are not supported. Convert with: openssl pkcs8 -topk8 -nocrypt -in ec.pem -out pkcs8.pem.
    EdDSA does not work in my browser
    Ed25519 in WebCrypto needs a recent browser. The tool tells you if yours cannot do it; use ES256 or RS256 instead.
    The signature is valid but the page shows a warning
    The token has expired or is not valid yet. The signature is genuine, but a correct system would refuse the token.

    Frequently asked questions

    Can this create or sign a JWT?

    No. It only decodes. Signing needs a secret or private key, which this tool does not handle.