JSON Web Tokens travel through modern applications constantly: in authorization headers, in cookies, in redirect URLs, and in logs. They look like three blocks of encoded text joined by dots, and they carry claims about identity, permissions, and expiry that determine what a user may do. The JWT Decoder on FreeToolZones opens a token and shows its header and payload as readable JSON, with the key dates translated into plain language, so you can inspect what a token actually says.
This guide explains the three-part structure of a JWT, how to decode one safely, and how to read the expiry, issued-at, and not-before claims. It repeats the most important warning in the tool itself: decoding is not verification. A decoded token proves nothing about authenticity, and a token must never be trusted merely because it decodes cleanly. If you build, debug, or audit systems that use JWTs, this page will help you inspect tokens correctly and safely.
What Is the JWT Decoder?
The JWT Decoder is a free online tool that decodes a JSON Web Token, commonly called a JWT, and displays its contents. A JWT consists of three parts separated by dots: a header, a payload, and a signature. The header and payload are JSON objects encoded in Base64URL form, a URL-safe variant of Base64. The signature is a cryptographic value computed over the header and payload using a secret or private key, and it is what allows a recipient to verify that the token was issued by a trusted party and has not been altered.
The decoder splits the token on dots and requires exactly three parts. It Base64URL-decodes the header and payload, parses each as JSON, and displays both in formatted form. A details table then summarizes the token: whether a signature part is present and how long it is, the algorithm named in the header, the token type named in the header, and the standard time claims when they are present as numbers. The expiry claim is converted to a UTC date and marked as expired or not yet expired by comparison with the current time. The issued-at and not-before claims are likewise converted to UTC dates.
Above the decoded content, the tool shows a prominent notice: Signature NOT verified. This tool only decodes the token. It does not verify the signature, so a decoded token must never be treated as trusted or authentic. That notice is the heart of honest JWT tooling. Because Base64URL decoding requires no key, anyone can decode any token, and anyone can create a token with any claims. Only signature verification with the correct key establishes trust, and this tool deliberately does not perform it. Decoding happens entirely in your browser, and the field help warns never to paste a real production token into any website you do not trust, because tokens should be treated like passwords.
- Three-part parsing: header, payload, and signature are split and checked for presence.
- Formatted JSON output: header and payload are shown as indented JSON.
- Token details table: signature presence, algorithm, type, and time claims are summarized.
- Expiry evaluation: the expiry claim is shown as a UTC date with an expired or current status.
- Signature warning: every result states that the signature was not verified.
- Sample token: a one-click sample loads a well-known example token for learning.
How to Use the JWT Decoder
The widget has one large input box and three buttons. Follow these steps to decode a token. Use a test token whenever possible, and treat real tokens as secrets.
- Paste the JWT into the input box. Copy the complete token, including all three parts and both dots, into the field labeled JWT. Copy carefully: a missing character at the start or end, or a line break in the middle, will cause a decoding error. Do not include surrounding quotes, the word Bearer, or header text from a log line.
- Click Decode JWT. Press the Decode JWT button. If the input is empty, the tool asks you to paste a JWT first. If the token does not have exactly three parts, an error message states how many parts were found. If the header or payload part is empty, or if either part fails to decode or parse as JSON, a specific error message explains the failure.
- Read the signature notice first. The result begins with the notice that the signature was not verified. Keep that fact in mind while reading everything below it. The decoded claims describe what the token asserts, not what has been proven true.
- Review the header and payload. The header section shows the decoded header JSON, typically naming the signing algorithm and the token type. The payload section shows the decoded payload JSON with its claims: subject, name, roles, expiry, and any custom claims the issuer included. Read the payload critically, noting which claims your application actually relies on.
- Check the token details table. The details table lists the signature status, the algorithm, the token type, and any time claims present. Pay special attention to the expiry row: it shows the UTC date and whether the token is expired at the current time. A token past expiry should be rejected by any proper verifier, regardless of what its other claims say.
- Try the sample token to learn safely. Click Load sample token to fill in a public example token, then decode it to see the full output without risking a real credential. The sample is the classic example token used in JWT documentation. Click Clear to empty the input box and remove the result when you are done, especially after decoding a real token on a shared machine.
After decoding a real token, clear the input and avoid leaving the token in clipboard history, screenshots, or shared documents. Tokens grant access until they expire, and a leaked token can be replayed by anyone who obtains it.
Key Features of the JWT Decoder
The decoder focuses on faithful decoding and clear presentation of time claims. The features below describe exactly what is checked, decoded, and displayed.
- Strict part counting. The token is split on dots, and exactly three parts are required. Tokens with too few or too many parts produce an error stating the part count found. This catches truncated copies, tokens with extra dots from surrounding text, and values that are not JWTs at all.
- Base64URL decoding with padding repair. Each part is decoded as Base64URL: hyphens and underscores are normalized, missing padding is added, and the bytes are interpreted as strict UTF-8. A failure at this stage produces an error asking you to check that the token was pasted completely, which is the most common cause.
- Separate JSON validation for header and payload. The header and payload are parsed independently, and each parse failure is reported with its own message naming the faulty part and the parser error. This distinction helps you determine whether the problem lies in the header, the payload, or the copy itself.
- Signature presence reporting. The details table reports whether the signature part is present, and if so, its character length, always with the reminder that it was not verified. An empty signature part is reported as missing, which is a warning sign: a token with no signature, or with an algorithm of none, should never be trusted by a verifier.
- Time claim conversion. When the payload expiry, issued-at, or not-before claim is a JSON number, it is interpreted as seconds since the Unix epoch and converted to a UTC date string. The expiry claim additionally receives an expired or not-yet-expired judgment based on the current time. Claims that are missing or not numbers are simply omitted from the table, without error.
- Algorithm and type display. The algorithm and token type values from the header are shown as text, or as a dash when absent. These values are informational only: the decoder does not check whether the algorithm is secure, and a token naming a weak or none algorithm decodes just like any other, which is precisely why verification matters.
- Local decoding with a trust warning. All decoding happens in your browser. The field help warns that tokens must be treated as passwords and never pasted into untrusted websites. This tool is designed for inspection on your own device, and the warning encourages the habit of using test tokens for learning and debugging.
Practical Use Cases for the JWT Decoder
Decoding is an inspection step in development, debugging, and auditing. The examples below show where seeing the claims directly resolves confusion fastest.
Debugging authentication failures
When a user cannot access a resource, the token often holds the answer: an expired token, a missing role claim, a wrong audience, or a subject that does not match the expected user. Decoding the token shows the claims the application received, letting you distinguish a token problem from an application logic problem. Compare the decoded claims with what the application requires, claim by claim.
Checking token expiry during development
Short-lived tokens expire quickly by design, and expired tokens produce confusing errors if the expiry is not recognized. The details table expiry row gives the exact UTC expiry time and the current status, so you can tell at a glance whether expiry explains a failure. If tokens expire too quickly for comfortable testing, adjust the lifetime in the test issuer configuration, not by ignoring expiry in code.
Inspecting claims from an identity provider
Identity providers issue tokens with varying claim names and structures. Decoding a test token from a new provider reveals exactly which claims it includes, how names and roles are represented, and whether custom claims appear as expected. This inspection prevents integration bugs caused by assuming a claim name or format that the provider does not use.
Auditing what a token exposes
Tokens are not encrypted by default: anyone holding one can decode it and read every claim. Decoding your own application tokens shows what information leaks to token holders, logs, and browser storage. If a payload contains sensitive personal data, internal identifiers, or secrets, that data is exposed to anyone with the token, and the design should be changed to carry only the minimum claims needed.
Learning the JWT structure
The sample token provides a safe, concrete example of header, payload, and signature parts. Decoding it and reading the formatted JSON teaches the structure faster than abstract descriptions. Learners can modify the sample payload text, re-encode it, and observe that decoding still succeeds while the signature no longer matches, which demonstrates why verification, not decoding, establishes trust.
Supporting incident investigation
During an incident, a token found in a log may need inspection to understand which user, service, or time window it relates to. Decoding reveals the subject, issuer, and time claims, which help scope the investigation. Handle such tokens as sensitive evidence: restrict access, avoid sharing them in chat, and revoke or rotate them if exposure is suspected.
Tips and Best Practices
- Never trust a decoded token. Decoding proves nothing. Only signature verification with the issuer trusted key, plus checks on expiry, audience, and issuer, establishes that a token is authentic and current. Build verification into your application with a maintained JWT library; never accept claims from decoding alone.
- Use test tokens for debugging. Debug with short-lived test tokens issued for development, not with production tokens belonging to real users. Test tokens limit the damage if a token is accidentally shared, and they can be revoked freely.
- Keep tokens out of URLs and logs where possible. Tokens in URLs appear in browser history, server logs, and referrer headers. Prefer authorization headers and secure cookies. When a token must appear in a log for debugging, redact it before sharing the log.
- Check expiry, issuer, and audience together. A token can be unexpired yet issued by the wrong issuer, or intended for a different audience. Verification must check all relevant claims, not expiry alone. The decoder shows time claims to aid inspection, but your verifier must enforce the full policy.
- Reject the none algorithm. A token whose header names the none algorithm carries no signature. Verifiers must reject such tokens explicitly. The decoder displays the algorithm value so you can see it during inspection, but display is not enforcement.
- Minimize payload claims. Include only the claims the application needs, because every claim is readable by the token holder. Avoid personal data, internal details, and anything you would not show the user. If a claim is sensitive, keep it server-side and reference it by identifier instead.
- Clear the tool after use. Click Clear after decoding a real token, and be mindful of clipboard contents on shared machines. Tokens are credentials, and good hygiene around them prevents accidental exposure.
Limitations of the JWT Decoder
The decoder does not verify signatures, validate issuers, check audiences, or enforce any security policy. It cannot tell you whether a token is genuine, whether the signing key is correct, or whether the token should be accepted. It does not decode encrypted tokens, known as JWEs, whose payloads are ciphertext rather than Base64URL JSON; such tokens will fail JSON parsing of the payload part. It does not fetch signing keys, check revocation, or contact any identity provider.
The tool requires exactly three dot-separated parts with JSON header and payload. Tokens with non-JSON parts, compressed payloads, or unusual encodings will fail with the corresponding error. Time claims are interpreted only when they are JSON numbers; string-formatted times are not converted. The expiry judgment uses the clock of your device, so a wrong device clock produces a wrong expired or current judgment. Finally, the tool inspects one token at a time, with no history or batch mode, so decode tokens individually and record the findings you need.
Frequently Asked Questions
What are the three parts of a JWT?
The header, the payload, and the signature, separated by dots. The header names the algorithm and token type. The payload carries the claims. The signature is computed over the header and payload with a key, and it is what verification checks. This tool decodes the header and payload and reports the signature presence without verifying it.
Does decoding a token verify it?
No. Decoding only reverses the Base64URL encoding so you can read the JSON. Anyone can decode any token and anyone can create a token with arbitrary claims. Verification requires checking the signature with the trusted key, plus expiry, issuer, and audience checks, using a proper JWT library in your application.
Why does the tool say the signature was not verified?
Because verification was not performed and must not be assumed. The notice appears on every result to prevent the dangerous misunderstanding that a readable token is a trustworthy token. Treat decoded claims as assertions that still need proof.
What does the expiry row mean?
When the payload contains a numeric expiry claim, the tool converts it to a UTC date and compares it with the current time on your device, marking the token as expired or not yet expired. This is an inspection aid, not an acceptance decision: your verifier must enforce expiry itself.
Is it safe to paste a real token into this tool?
Decoding happens in your browser, and the tool does not upload the token. Even so, the field help advises treating tokens as passwords and never pasting a real production token into any website you do not trust. Prefer test tokens for debugging, and clear the tool afterward if you decode a real one.
Why does my token fail to decode?
Common causes include an incomplete copy, extra text such as Bearer or quotes, a wrong number of dot-separated parts, or a part that is not valid Base64URL or JSON. Copy the complete token alone, check the part count in the error message, and try again. Encrypted tokens cannot be decoded by this tool.
Related Tools
These related tools decode encodings, inspect hashes, and generate identifiers used alongside tokens. Browse the full collection from the FreeToolZones home page.
- Base64 Decoder – decode individual Base64URL parts and other encoded values.
- Base64 Encoder – encode text, including URL-safe output for token-like values.
- JSON Formatter – format decoded JSON payloads for closer inspection.
- SHA256 Hash Generator – compute hashes when integrity checking is needed.
- UUID Generator – generate identifiers often carried as token claims.