JWT Decoder
Paste a JSON Web Token to decode its header and payload locally. See algorithm details, claim chips and expiry warnings without sending data to a server.
HEADER
PAYLOAD
SIGNATURE
When do you need to decode a JWT without verifying it?
What this tool does
The Kitnax JWT Decoder splits a JSON Web Token into its three parts — header, payload, and signature — and displays the decoded JSON for the first two segments. Standard claims such as exp, iat, sub, and iss appear as readable chips alongside formatted JSON you can copy. Expiry warnings highlight tokens whose exp timestamp is in the past relative to your clock. Parsing happens entirely in your browser; no token data is sent to Kitnax servers or third-party APIs.
Why you need it
JWTs carry authorization context in OAuth flows, microservice gateways, and single sign-on integrations, but the compact string format hides details until you decode it. During development you need to confirm which algorithm the header declares, whether the audience claim matches your API, or why a gateway returns 401 despite a seemingly valid session. Decoding is a debugging step — it answers "what claims does this token contain?" without replacing server-side signature verification. Production authentication must always validate signatures with issuer keys; a decoded payload alone proves nothing about trustworthiness.
How to use it
- Paste a JWT string (header.payload.signature) into the Token field or click Load Sample for a demo token.
- Click Decode to parse the three segments — decoding also runs as you edit when the format is valid.
- Review the HEADER panel for alg, typ, and kid values that tell you how the token was signed.
- Inspect PAYLOAD claims, paying attention to exp warnings and standard fields rendered as chips.
- Copy header, payload, or signature segments individually when filing bug reports or comparing environments.
Practical examples
- OAuth debugging: decode an access token from your identity provider and confirm the scp or roles claim matches what your API middleware expects.
- SSO integration: compare iat and exp on tokens issued by different environments to diagnose clock skew or overly short lifetimes.
- Gateway troubleshooting: verify that alg in the header is RS256 while your service still validates with an outdated HS256 secret.
- Learning JWT structure: load the sample token and trace how Base64URL-encoded JSON maps to the three dot-separated parts.
How it works
A JWT is three Base64URL-encoded segments joined by dots. The header JSON typically includes alg (signing algorithm) and typ (token type). The payload holds claims — registered names like exp and custom application fields. The signature is a cryptographic MAC or asymmetric signature over header and payload; verifying it requires the issuer's secret or public key and is intentionally out of scope for this decoder.
Kitnax Base64URL-decodes the first two segments and pretty-prints the JSON. The signature segment is shown as encoded text so you can copy it, but this tool does not recompute or validate it. That distinction matters for production auth: an attacker can craft a payload with admin claims and leave the signature unchanged or set alg to none — only signature verification on your backend prevents that. Decoding is safe for inspection when you understand the limits; trusting decoded content without verification is not.
All processing stays client-side. Tokens are not logged or transmitted.
Common mistakes
- Assuming a successfully decoded token is authentic — decode reveals content; verify signatures on the server before granting access.
- Ignoring alg in the header and validating with the wrong key type (symmetric vs asymmetric).
- Pasting long-lived production tokens into shared screens or recordings even when tooling runs locally.
- Expecting opaque refresh tokens to decode — many providers store refresh tokens as random strings, not JWTs.
FAQ
Does this verify JWT signatures?
No. Decoding reveals header and payload JSON only. Signature verification requires your issuer's public key or secret on a trusted server — never assume a decodable token is authentic in production auth.
Is it safe to paste production tokens?
This tool runs locally and does not upload tokens, but JWTs often carry user IDs, roles, and session data. Treat production tokens as sensitive, avoid screen sharing while they are visible, and revoke any token you suspect was exposed.
Why does expiry show a warning?
The exp claim is compared to your system clock. Expired tokens should be rejected by your API regardless of whether the payload still looks valid when decoded.
What if decoding fails?
Check for extra quotes, whitespace, missing segments, or non-Base64URL characters. Valid JWTs have exactly two dots separating three Base64URL-encoded parts: header, payload, and signature.
Are refresh tokens supported?
Any string formatted as a JWT decodes the same way. Opaque refresh tokens stored as random strings in a database are not JWTs and will not parse here.