JWT Decoder
Decode the header, payload, and signature segment of a JSON Web Token and read expiration claims. This does not check authenticity.
Your data stays in your browser. This tool processes your input locally and does not upload it to a server.
Decoding only reads the token: it does not prove the token is authentic. Use the verify section below with the secret or public key to check the signature. Everything happens in your browser.
What is a JWT and how do you decode and verify one?
A JSON Web Token (JWT) is a compact, URL-safe string of three base64url parts, header.payload.signature, that carries claims such as who the user is and when the token expires. Decoding reveals those claims; verifying checks the signature. This tool does both in your browser, without uploading the token.
Decoding is not verifying
The header and payload are only base64url-encoded JSON, not encrypted, so anyone holding the token can read them. Decoding therefore proves nothing about where the token came from. Only the signature, computed over the exact text header.payload with a secret or private key, shows that the issuer created the token and that nobody changed it afterwards.
Paste a token and the decoder updates as you type, colouring the header, payload and signature differently. A claims list explains the registered claims from RFC 7519 (iss, sub, aud, exp, nbf, iat, jti) and shows exp, nbf and iat as ISO 8601 timestamps with a relative phrase such as "expires in 1 h" or "expired 3 d ago".
Verifying a signature in the browser
The verify section follows the alg in the header. HS256, HS384 and HS512 use a shared secret, which you can enter as plain text or tick as base64url-encoded bytes. RS256/384/512, PS256/384/512 and ES256/384/512 use a public key, pasted as SPKI PEM, PKCS#1 RSA PEM, a JWK or a JWKS (matched by kid). ECDSA signatures are the raw R||S form that JWS (RFC 7515) requires, not DER.
Results are explicit: valid, invalid, a key problem, or unable to verify, for example alg "none" or an algorithm that is not supported. Verification uses Web Crypto locally. Still, never paste production secrets or private keys into any site you do not fully trust.
Encoding and sample tokens
Load sample token creates a clearly fake HS256 token that expires in one hour and fills in its secret, so you can watch verification succeed and then fail after you edit one character. The Encode tab signs your own header and payload with an HMAC secret (HS256, HS384 or HS512), which is handy for building test fixtures.
Examples
Decode the classic HS256 example
Input
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5cOutput
Header: {"alg":"HS256","typ":"JWT"}
Payload: {"sub":"1234567890","name":"John Doe","iat":1516239022}
iat: 2018-01-18T01:30:22.000ZNo exp claim, so the token never expires on its own.
Verify it with the secret
Input
Secret: your-256-bit-secret (plain text)Output
Signature validAny other secret gives "Signature invalid".
A tampered payload fails
Input
Same header and signature, payload changed to {"sub":"1234567890","name":"Mallory","iat":1516239022}Output
Signature invalidThe signature covers the original payload text, so any edit breaks it.
Common mistakes and edge cases
- Treating a decoded token as trusted. Always verify the signature, then check exp, nbf, iss and aud in your own code; this tool does not enforce them for you.
- Accepting alg "none". An unsigned token can be forged by anyone, so servers must reject it.
- Algorithm confusion: verifying an HS256 token with an RSA public key as if it were a shared secret. Fix the expected algorithm on the server instead of trusting the token header.
- Wrong secret encoding. Some systems store the secret as base64; if verification fails with the right secret, try the base64url option.
- Storing secrets or personal data in the payload. The payload is readable by anyone who holds the token.
- Pasting production tokens or secrets into untrusted sites. Use throwaway keys when testing.
How to use this tool
- Paste a JWT.
- Read the decoded header and payload.
- Check the expiration and issued-at claims. The signature is displayed and not verified.
Frequently asked questions
Is it safe to paste my JWT here?
Decoding and verification run entirely in your browser using JavaScript and Web Crypto, and the page is not allowed to make network requests, so the token is never uploaded. Even so, a live token is a credential until it expires. Prefer expired or test tokens, and never paste production signing secrets or private keys into any website you do not control or fully trust.
Why does decoding work without a secret?
A standard signed JWT (a JWS) is not encrypted. Its header and payload are base64url-encoded JSON that anyone can decode. The secret or private key is only needed to produce and check the signature. If you need confidentiality, use an encrypted token (JWE) or keep sensitive data out of the token. This tool only handles signed, three-part tokens.
Which algorithms can I verify?
HS256, HS384 and HS512 with a shared secret; RS256, RS384 and RS512 (RSASSA-PKCS1-v1_5); PS256, PS384 and PS512 (RSASSA-PSS); and ES256, ES384 and ES512 (ECDSA on P-256, P-384 and P-521) with a public key in PEM or JWK form. Other algorithms such as EdDSA report as unsupported rather than as a false result.
Why does my signature say invalid?
The usual causes are the wrong secret or public key, a secret that is base64-encoded but entered as plain text, the wrong key from a rotating JWKS, or a token that was changed after signing, even by one character or by whitespace. For ES* tokens the signature must be raw R||S (64, 96 or 132 bytes); a DER-encoded signature is reported as invalid.
What do exp, nbf and iat mean?
They are NumericDate values: seconds since 1970-01-01 UTC. exp is the moment after which the token must be rejected, nbf is the moment before which it must be rejected, and iat records when it was issued. The decoder shows each as an ISO 8601 timestamp with a relative description such as "expires in 2 h" so you do not need to convert them by hand.
References
Last reviewed