🎫JWT Decoder - Decode & Verify JWT Online
Paste a JWT (JSON Web Token) and it is split into its header and payload right away, pretty-printed, with exp, iat and nbf converted to local time and marked Expired, Not yet valid or Currently valid along with how long is left. To check whether the token is genuine, use the Verify signature box below: enter the signing secret for HS256/384/512, or paste the public key for the RS, PS and ES families and EdDSA as PEM, JWK or a whole JWKS, and the result shows instantly whether the signature is valid. A Bearer prefix copied from a request header is stripped automatically, and five-part encrypted tokens (JWE), alg: none and pasted private keys are all explained instead of failing silently. Decoding and verification run locally with the browser's built-in WebCrypto, so neither the token nor the key is sent to any server.
How to use JWT Decoder
- 1Paste a full JWT (like xxxxx.yyyyy.zzzzz); a Bearer prefix from a request header is fine
- 2Read the decoded header, payload and time claims to see whether it has expired
- 3To verify, enter the secret (HS family) or public key (RS, PS, ES, EdDSA) under Verify signature; tick Secret is Base64-encoded if your secret is stored that way
- 4Read the result: signature valid, signature invalid, or what is wrong with the key
FAQ
- Can I trust what the decoder shows?
- Not on its own. The header and payload are just Base64URL-encoded JSON, not encrypted, so anyone can decode them, change the contents (set role to admin, push exp further out) and put the token back together. Only the third part, the signature, proves the contents are unchanged, so trust depends on the Verify signature result, not on the decoded text.
- What do I enter to verify the signature?
- Look at alg in the header. HS256, HS384 and HS512 are symmetric: the same secret signs and verifies, so enter the secret string used to sign. Some systems store that secret as Base64; tick Secret is Base64-encoded in that case, or the token will show as invalid. RS, PS, ES and EdDSA are asymmetric: a private key signs and the public key verifies, so paste the public key as PEM (-----BEGIN PUBLIC KEY----- or -----BEGIN RSA PUBLIC KEY-----), a single JWK, or the whole JWKS your auth server publishes (usually at /.well-known/jwks.json). The tool picks the key whose kid matches the token header.
- How long is the signature for each algorithm?
- The signature length is fixed by the algorithm, which is a quick way to spot a truncated token. In Base64URL: HS256 is 32 bytes or 43 characters, HS384 is 64 characters, HS512 is 86; RS256 and PS256 with a 2048-bit key are 256 bytes or 342 characters, and 683 characters with a 4096-bit key; ES256 is 64 bytes or 86 characters, ES384 is 128 characters, ES512 is 132 bytes or 176 characters; EdDSA (Ed25519) is 64 bytes or 86 characters. ES signatures are R and S concatenated, not the DER format OpenSSL outputs by default, so a DER signature pasted into a JWT will fail to verify.
- Why does it say the signature is invalid?
- Most often the key is wrong: staging and production secrets mixed up, a stray space or line break around the secret, or a Base64-stored secret without the box ticked. Next most common is a token that was edited or lost a few characters when copied (compare its signature length with the previous answer). With public keys, if the auth server has rotated keys you need the JWKS entry whose kid matches the token; an old key will not verify a new token.
- What is a token with alg: none?
- alg: none means the token is unsigned and the third part is empty, so anyone can forge one. The spec allows the form, but production systems should never accept it; some JWT libraries once let none tokens through, which led to authorization bypasses. The tool flags none tokens as untrustworthy instead of verifying them.
- What are exp, iat and nbf, and are they seconds or milliseconds?
- exp is the expiry time, iat the issue time and nbf the not-before time (the token cannot be used earlier). The spec says all three are seconds since 1970-01-01 UTC; for example 1767225600 is 2026-01-01 00:00 UTC. Some systems wrongly use milliseconds (13 digits), which read as seconds would land tens of thousands of years in the future; when a value exceeds 10^11 the tool reads it as milliseconds and says so. Servers usually allow some clock skew, from tens of seconds to a few minutes, when checking expiry.
- Why is only the header shown for a five-part token?
- Three-part tokens are signed (JWS) and their contents are merely encoded. Five-part tokens are encrypted (JWE): the second part is the encrypted content key and the fourth is the encrypted body, which can only be read after decrypting with the recipient's private key or shared secret. The tool does not decrypt, so it shows only the header, which names the alg and enc used.
- Are my token and key safe?
- Decoding and verification run entirely in your browser, and neither the token nor the key is sent to any server. Verification only needs the public key; never paste a private key into any web page, and the tool warns you if you do. An HS secret is the credential that signs tokens, so verify production tokens on your own device and close the page when done.
- Are my files or data uploaded?
- No. Everything runs locally in your browser with no network upload, and is discarded when you close the page.
- Do I need to sign up or pay?
- No. The site is completely free, needs no account and has no usage limits.
Features
- Decodes header and payload with pretty JSON and one-click copy of each part
- Converts exp / iat / nbf to local time with an expiry badge and relative time; spots tokens that wrongly use milliseconds
- Signature verification for HS256/384/512, RS256/384/512, PS256/384/512, ES256/384/512 and EdDSA (Ed25519)
- Public keys as PEM (BEGIN PUBLIC KEY or BEGIN RSA PUBLIC KEY), JWK, or a full JWKS with the key picked by kid
- Explains common mistakes: alg: none, a pasted private key or certificate, a key type that does not match the algorithm, JWE tokens
- Decoding and verification stay in your browser; the token and key are never uploaded