Home/Tools/Developer Tools/JWT Decoder
JWT Decoder
Developer ToolsDecoded in your browser. The token is never sent to our servers and this tool keeps no run history, because tokens are credentials. Privacy
What the JWT Decoder does
The JWT Decoder splits a JSON Web Token into its header, payload and signature and shows the claims as formatted JSON, with exp, nbf and iat as readable dates in your time zone and a badge that says whether the token has expired. An optional HS256/HS384/HS512 signature check runs with your secret in the browser. It is for developers debugging authentication. Unlike the other tools here, it keeps no run history: tokens are credentials.
How to use it
- 1Paste the token (with or without a leading 'Bearer ') into the box.
- 2Press Decode (or Cmd/Ctrl+Enter). The badge shows Not expired, Expired, Not yet valid or No expiry claim.
- 3Read the claims table: each standard claim is labeled, and exp, nbf and iat are shown as dates in your local time zone with a relative time.
- 4Copy the header or payload JSON if you need it in a ticket or a test.
- 5To check an HMAC signature, enter the shared secret and press Verify signature. The check runs on your device.
Options explained
- Decode
- Base64URL-decodes the first two segments and parses them as JSON. Works on any JWS token regardless of algorithm; the signature is shown but not checked until you ask.
- Claims table
- Lists every payload claim with the name from RFC 7519 where one exists (iss Issuer, sub Subject, aud Audience, exp Expiration time, nbf Not before, iat Issued at, jti JWT ID) plus common OpenID claims. Numeric date claims are rendered in your time zone, labeled, with 'in 2 hours' or '3 days ago'.
- Signature check with a secret
- For HS256, HS384 and HS512 tokens. Enter the shared secret; tick 'Secret is Base64URL-encoded' when your provider gives the secret in that form (Auth0 legacy clients, some Firebase setups). WebCrypto computes the HMAC locally and compares it to the token's signature.
- Prefill from a link
- A token can be passed in the URL fragment, /tools/jwt-decoder#token=eyJ…, which browsers never send to the server. Query strings are deliberately not supported for tokens.
- Clear
- Empties the box and removes any token from the URL fragment.
Common problems and limits
RS256, ES256 and other public-key algorithms are decoded but cannot be verified here, because verification needs the issuer's public key, not a secret. The tool says so instead of guessing.
A five-segment token is a JWE (encrypted JWT); its payload cannot be read without the decryption key, and the tool tells you that rather than showing garbage.
Decoding does not mean the token is trustworthy. Anyone can read a JWT's payload; only a verified signature proves who issued it and that it was not altered. Never trust claims from an unverified token in production code.
The expired/valid badge compares exp and nbf with your device clock; a wrong clock gives a wrong badge.
This tool does not save runs. Your past runs page will not list decodes, by design.
Who uses it
- Backend developers: Find out why an API returned 401: read the exp claim, the audience and the issuer without writing a script.
- Front-end developers: Check which scopes or roles a token actually carries before debugging a permissions check.
- Security and DevOps engineers: Verify that a token was signed with the expected secret and algorithm, and that alg is not 'none'.
- Integrators of ecommerce and HR platforms: Inspect the webhook or SSO token a vendor sends to see which identifiers it includes before mapping them.
- Students: See the three parts of a JWT and how Base64URL and JSON fit together.
Frequently asked
What is a JWT decoder?
A tool that splits a JSON Web Token into header, payload and signature and shows the first two as readable JSON. JWTs are Base64URL-encoded, not encrypted, so decoding needs no key; verifying the signature does.
Can I decode a JWT online safely?
Decoding reveals the payload to whatever tool you paste it into, so use one that keeps the token on your device. This decoder runs entirely in your browser, does not send the token to a server and, unlike our other tools, saves no run history. Tokens for production systems are still credentials: prefer expired or test tokens when you can.
Can I decode a JWT locally?
Yes. This page works locally in the browser, and in a terminal you can run echo "$PAYLOAD" | tr '_-' '/+' | base64 -d (adding = padding as needed), or use jwt-cli or a library such as jsonwebtoken's decode().
Is JWT decoding safe?
Decoding is read-only and cannot alter the token. The risk is where you paste it: a token that is still valid is a credential, so only use tools that keep it on your device. Also remember that decoded claims are untrusted until the signature is verified.
How do I decrypt an OAuth token?
Most OAuth access tokens are either opaque strings (nothing to decode; use the provider's introspection endpoint) or signed JWTs, which are decoded, not decrypted, as on this page. Only JWE tokens are encrypted, and those need the recipient's private key.
How do I decode a JWT token offline?
Load this page once and it keeps working without a connection, or use a command-line tool. The payload is the middle segment, Base64URL-decoded (replace - with +, _ with /, add = padding) and parsed as JSON.
How can I decode a JWT using Base64?
Split the token on dots. Convert the Base64URL alphabet to standard Base64 (- to +, _ to /), pad to a multiple of four with =, then Base64-decode the first two segments and read the JSON. The signature segment is raw bytes and will not be readable.
Is it possible to decode a JWT token without the secret?
Yes. The header and payload are only encoded, so anyone can read them. The secret (or public key) is needed only to verify the signature, which is what makes the claims trustworthy.
Automation: an MCP tool decode_jwt(token) → {header, payload, expired} and an n8n node are planned for this tool. Runs of this tool are never stored.