JWT Decoder
Decode a JSON Web Token, read its claims and dates, and optionally verify its signature
Decoded as you type, entirely in your browser. The token is never sent anywhere and never put in the address bar, so it will not end up in your history or a shared link.
Decoding is not verification. Anyone can write a token containing any claims they like. What you see below is only what the token says about itself until its signature has been checked against the issuer's key.
Decoded token
Header algorithm and token type
Payload the claims
Claims explained
| Claim | Value | Meaning |
|---|
Signature
Verify the signature (optional)
Supply the key the issuer signs with and the signature is checked with your browser's Web Crypto API. HS256, HS384 and HS512 need the shared secret; RS256, RS384, RS512, PS256, PS384, PS512, ES256, ES384, ES512 and EdDSA need the issuer's public key as PEM or JWK. Never paste a private key into any website.
About JSON Web Tokens
A JSON Web Token (JWT, pronounced "jot", defined in RFC 7519) is a compact way of passing a set of claims between two parties: who a user is, what they may do, and how long that statement holds. You meet them as OAuth 2.0 access tokens, OpenID Connect ID tokens, session cookies, API keys and webhook signatures. Almost every JWT in the wild is a signed token (a JWS, RFC 7515), written as three base64url strings joined by full stops: header.payload.signature.
The header says how the token was signed, for example "alg": "RS256". The payload holds the claims. The signature is calculated over the first two parts with a secret or private key. Base64url is an encoding, not encryption: anyone holding the token can read the payload, which is exactly what this tool does. Never put passwords, card numbers or other secrets in a JWT payload.
How to use this decoder
- Paste the token into the box. A leading
Bearerand stray spaces or line breaks are removed for you. The header and payload are decoded as you type. - Read the warnings first. They flag an
algofnone, a missing expiry, an unusually long lifetime, an expired or not-yet-valid token, and timestamps that look like milliseconds rather than seconds. - The Claims explained table describes each registered claim (RFC 7519) and the common OpenID Connect ones, and shows
iat,nbf,expandauth_timeas dates in UK time (GMT or BST, whichever applied) and in UTC, with a plain-English "expired 3 days ago" or "valid for 2 hours". - To check the signature, enter the shared secret (for HS256, HS384 or HS512) or paste the issuer's public key (for RSA, RSA-PSS, ECDSA or EdDSA) and press Verify signature. Public keys are accepted as a PEM
PUBLIC KEY, a PEMRSA PUBLIC KEY, a PEM certificate, a single JWK, or a whole JWKS document, in which case the key whosekidmatches the token's header is chosen.
Decoding is not verification
This is the single most important point about JWTs. Decoding proves nothing: anybody can type {"sub":"admin"}, base64url-encode it and glue on a made-up signature. A token can only be trusted after the receiving server has checked the signature with a key it already trusts, and has then checked that the token has not expired (exp), is already valid (nbf), came from the expected issuer (iss) and was meant for this service (aud). A "signature verified" result here only tells you the token was signed by whoever holds the key you supplied. It says nothing about whether that key belongs to someone you should trust.
Worked example
Press Sample token. The tool builds a fresh HS256 token signed with a sample secret and fills in that secret, so the signature verifies straight away. Its payload includes "iss": "https://auth.example.com", a subject of user-48213 and an exp one hour after iat, so the expiry line shows just under an hour remaining. Now change a single character of the payload part of the token: the decoded claims change and verification fails, because the signature no longer matches. Change the secret by one letter and verification fails too. That is the whole security model of a signed JWT in two experiments.
The test vector from RFC 7515 Appendix A.1 also works: it is an HS256 token from 2011 whose key is given there as a JWK, and you can paste that JWK into the secret box (it is recognised automatically). It verifies, and is reported as long expired.
The warnings explained
- alg "none" means the token is unsigned. A server that accepts it lets anyone forge any identity. Libraries should reject it unless explicitly configured otherwise.
- No exp claim means the token never expires on its own. If it leaks, it works for ever unless the issuer keeps a revocation list.
- Long lifetime: access tokens are normally valid for minutes to an hour, with refresh tokens used to get new ones. A lifetime of days or weeks widens the window for a stolen token.
- Milliseconds: JWT dates are NumericDate values, whole seconds since 1 January 1970 UTC. A 13-digit value is almost certainly a bug that makes the token valid for tens of thousands of years.
- jku, x5u or jwk headers tell the verifier where to find a key. A verifier that follows them without an allow-list can be tricked into using an attacker's key.
Limitations
Encrypted tokens (JWE, five parts) cannot be decrypted here: only their header is shown. ES256K, other uncommon algorithms and detached or unencoded payloads (RFC 7797) are not verified. EdDSA verification needs a browser with Ed25519 support in Web Crypto, which current Chrome, Edge, Firefox and Safari have. Dates are shown using your device's clock, so a wrong system clock gives wrong "expired" wording. The tool does not check whether a key has been revoked or whether a token has been replayed.
Privacy
Tokens are live credentials, so treat them carefully. Everything on this page, including signature verification, runs in your browser with JavaScript and the built-in Web Crypto API. The token, secret and key are never uploaded, logged or stored, and the token is deliberately kept out of the address bar. Even so, prefer expired or test tokens when you can, and rotate any production secret you have pasted somewhere you would not normally keep it.
Common questions
Can a JWT be decoded without the secret?
A JWT can be decoded without the secret, because its header and payload are only base64url-encoded, not encrypted. Anyone who holds the token can read every claim in it. The secret or public key is needed only to verify the signature, which is what shows the token was signed by the holder of that key and has not been altered.
Is a JWT encrypted?
A standard JWT is signed, not encrypted. Its header and payload are base64url-encoded, so they are readable by anyone who obtains the token, and the signature only protects them against tampering. An encrypted token is a JWE, which has five parts instead of three. Secrets such as passwords should never be placed in an ordinary JWT payload.
What is the difference between HS256 and RS256?
HS256 signs a JWT with HMAC-SHA-256 and a single shared secret, so the same key both creates and verifies tokens. RS256 signs with an RSA private key and SHA-256, and verification uses the matching public key. With RS256 a service can check tokens without being able to issue them, which suits systems where many services trust one issuer.
What happens when a JWT expires?
When a JWT expires, meaning the current time has reached the value of its exp claim, a correctly written server rejects it. The exp value is a count of seconds since 1 January 1970 UTC. An expired token cannot be extended, because changing the payload invalidates the signature; the client has to obtain a new token from the issuer.