JWT Decoder - Decode & Verify JSON Web Tokens Online
Paste a JSON Web Token to instantly decode its header and payload, inspect the standard claims, and optionally verify an HMAC-SHA-256 signature.
Everything runs locally in your browser: the decoder splits the token, Base64URL-decodes the first two segments, and pretty-prints the JSON. Nothing is uploaded anywhere.
JWT Decoder - Decode & Verify JSON Web Tokens Online
Paste a JSON Web Token to instantly decode its header and payload, inspect the standard claims, and optionally verify an HMAC-SHA-256 signature.
Privacy: your token never leaves the browser. Decoding and verification happen entirely on your device — nothing is logged or sent to a server.
How it works: a JWT is three Base64URL segments separated by dots — header.payload.signature. Decoding needs no key; only signature verification does.
About the JWT decoder
A JSON Web Token (JWT) is a compact, URL-safe way to pass signed claims between two parties, defined in RFC 7519. You meet JWTs everywhere in modern web development: OAuth 2.0 and OpenID Connect access and ID tokens, session cookies for single-page applications, service-to-service authentication, password-reset links, and webhook signatures. Every JWT is three Base64URL-encoded segments joined by dots. The first segment is the header, a small JSON object that names the signing algorithm and token type. The second is the payload, the JSON object carrying the actual claims — who issued the token, whom it is about, and when it expires. The third segment is the signature computed over the first two.
This JWT decoder splits the token, decodes the header and payload, and pretty-prints both as formatted JSON so you can read every claim at a glance. It also pulls out the registered claims from the payload — issuer, subject, audience, expiration, issued-at, not-before, and token ID — and shows the time-based ones both as raw Unix timestamps and as human-readable UTC dates. A status line tells you immediately whether the token has already expired, is not valid yet, or carries no expiry at all, which is the single most common thing developers need to check when an API suddenly starts returning 401 responses.
Decoding a JWT requires no secret, because Base64URL is an encoding, not encryption: anyone who holds a token can read its contents. That is exactly why you should never put passwords or other sensitive data inside a JWT payload. What does require a key is verification. If your token was signed with the symmetric HMAC-SHA-256 algorithm, you can paste the shared secret into the optional verification section and the tool recomputes the signature with the browser's built-in Web Crypto API and compares it to the one on the token. A match proves the token was produced by someone holding that secret and has not been altered.
Privacy matters when you are pasting real tokens from a production system. This tool does all of its work inside your browser tab: the token and the secret are processed in local JavaScript, never sent over the network, never stored, and never logged. Close the tab and they are gone. Note the limitations: asymmetric algorithms such as RS256 or ES256 need the issuer's public key and are not verified here, and a signature check says nothing about whether the issuer itself should be trusted — always validate issuer and audience in your backend.
Typical uses include debugging login flows, checking why an access token is rejected, confirming which scopes or roles a token grants, comparing tokens from different environments, and teaching how the JWT format works.
JWT decoder examples
These examples show what the decoder reports for typical tokens and inputs.
| Input | Decoder output | Note |
|---|---|---|
| A three-segment token from your identity provider | Formatted header and payload JSON, a claims table, and an expiry status line | The alg field in the header tells you which algorithm signed the token. |
| A token whose exp claim is 1516242622 | exp shown as 2018-01-18 02:50:22 UTC and flagged as expired | Time claims are Unix timestamps in seconds; the decoder converts them to UTC dates. |
| Only two dot-separated segments, e.g. a truncated copy-paste | Error: a JWT needs exactly three segments | Truncation while copying from logs or headers is the most common decoding failure. |
| A valid HMAC-signed token plus the correct shared secret | Signature verified message after the in-browser check | Change even one character of the payload and the same secret will no longer match. |
How to decode a JWT
- Copy the token from your Authorization header, cookie, or log output — the whole xxxxx.yyyyy.zzzzz string without the "Bearer " prefix.
- Paste it into the token field and click Decode to see the header, payload, registered claims, and expiry status.
- Check the claims table: exp, iat, and nbf are shown both as raw seconds and as UTC dates so you can spot expiry problems instantly.
- Optionally paste the shared secret and click Verify signature to confirm an HMAC-SHA-256 token is authentic.
- Click Clear to wipe the token and secret from the page when you are done.
JWT decoder FAQ
Is it safe to paste a real JWT into this tool?
Yes. Decoding and signature verification run entirely in your browser with local JavaScript and the Web Crypto API. The token and secret are never transmitted, stored, or logged. For extra caution with production credentials, you can load the page, go offline, and it still works.
Do I need a secret key to decode a JWT?
No. The header and payload are only Base64URL-encoded, not encrypted, so anyone can decode and read them. The secret (or private key) is only needed to create or verify the signature — which is also why you should never store sensitive data in a JWT payload.
What do the exp, iat, and nbf claims mean?
They are Unix timestamps in seconds: iat records when the token was issued, nbf is the earliest moment it may be accepted, and exp is the moment it stops being valid. The decoder converts each one to a readable UTC date and tells you whether the token is currently inside its validity window.
Why does my API reject a token that decodes fine here?
Decoding only proves the token is well-formed. Servers additionally check the signature, expiry, issuer, and audience. The most frequent causes are an expired exp claim, a clock-skewed nbf, a wrong aud value, or a signature produced with a different key than the server expects.
Can this tool verify RS256 or ES256 tokens?
No. Those are asymmetric algorithms that require the issuer's public key, typically fetched from a JWKS endpoint. This tool verifies only symmetric HMAC-SHA-256 signatures with a shared secret; tokens using other algorithms still decode normally, they just cannot be verified here.
What is the difference between decoding and verifying?
Decoding reads the contents; anyone can do it without any key. Verifying recomputes the cryptographic signature over the header and payload and compares it with the token's third segment, proving the token was issued by a holder of the key and has not been modified since.