This free JWT decoder reads a JSON Web Token’s header and claims and turns its exp, iat and nbf times into UTC dates. Unsigned or never-expiring tokens get a warning. The sample token for user-1234 shows Expired on 2023-11-14 23:13:20 UTC, 1 hour after it was issued. Nothing you enter reaches our server.
Expiry
Expired on 2023-11-14 23:13:20 UTC
- Expiry
- Expired on 2023-11-14 23:13:20 UTC
- Warnings
- None found in the header and claims.
- Signature
- Not checked: paste the secret or public key above to check it in this page.
- Algorithm (alg)
- HS256
- Type (typ)
- JWT
- Subject (sub)
- user-1234
- Issuer (iss)
- https://auth.example.com
- Issued at (iat)
- 2023-11-14 22:13:20 UTC
- Header (JSON)
- { "alg": "HS256", "typ": "JWT" }
- Payload (JSON)
- { "sub": "user-1234", "iss": "https://auth.example.com", "aud": "example-app", "iat": 1700000000, "exp": 1700003600, "role": "reader" }
Every claim
| Claim | Value | As a date (UTC) |
|---|
How this is calculated
- How it works
- A JWT is three Base64url parts joined by dots: a header naming the algorithm, a payload of claims, and a signature (RFC 7519 (opens in new window)). This page decodes the first two and turns the exp, iat and nbf claims, which count seconds since 1970 in UTC, into dates. It checks the signature only when you paste the secret or public key, with your browser's Web Crypto API (HS, RS, PS and ES algorithms and EdDSA). The key stays in this page: it is never sent, saved, copied or put in a link. A public key is never used as an HMAC secret, the key-confusion mistake RFC 8725 warns about.
- Not covered
- Decodes signed tokens (JWS) only, not encrypted ones (JWE); checks a signature only with a key you paste.
- Privacy
- What you enter never reaches our server. It is processed on your device, inside this page.
- Corrections
- Report a wrong result to media@sqmagazine.co.uk; every report is reviewed and confirmed errors are corrected. Include the inputs and the answer you expected. With your permission, we thank you by name on this page.
- Updates
- Published.
- Feedback
- How useful was this tool?
Table of Contents
How to Use the JWT Decoder
The JWT decoder takes one input: a token in the compact form the IETF defines for JSON Web Tokens. Decoding starts 350 milliseconds after typing stops. A token is three runs of letters, digits, hyphens and underscores joined by dots.
- Copy the whole token, including the part after the last dot.
- Paste it into “JSON Web Token”. A token copied from an Authorization header works too: the tool removes a `Bearer ` prefix before decoding.
- Read “Expiry” to see whether the token’s exp time has passed, then “Warnings” for anything the decoder flagged.
- Check “Algorithm (alg)” and “Type (typ)” from the header, then “Subject (sub)”, “Issuer (iss)” and “Issued at (iat)” from the payload.
- Read “Signature”. That line always reports the signature as not checked, because that needs a key this page never asks for.
Below the results, “Every claim” lists each claim in the payload under “Claim” and “Value”. Its “As a date (UTC)” column converts exp, iat and nbf. “Copy” puts the “Expiry” line on your clipboard, and “Copy all details” copies the results without the token.
“Download CSV” saves the claims table to your device, claim values included. No share link is offered, so a token never lands in a URL, and “Reset” brings back the sample.
Every one of those fields comes out of the token’s own text.
How the JWT Decoder Reads a Token
To decode a JWT, the tool reverses the encoding and stops short of the signature. The IETF’s JSON Web Signature standard calls the usual form the JWS Compact Serialization. It represents digitally signed or MACed content as a compact, URL-safe string.
That string is the encoded header, a dot, the encoded payload, a dot and the encoded signature. None of it is secret.
Each part uses base64url: Base64 with a URL-safe alphabet, with all trailing ‘=’ characters omitted. As a JWT parser, the tool works in four steps:
- Whitespace is trimmed, any `Bearer ` prefix removed and the text split at the dots. Anything other than 3 parts is refused.
- Header and payload are base64url-decoded, read as UTF-8 text and parsed as JSON.
- From the header come alg and typ; from the payload, every claim.
- Only the signature part stays encoded, since checking it needs the signing key.
The IETF’s JSON Web Token standard, published in May 2015, stores times as a NumericDate. As the IETF’s Standards Track text for JWTs, its rules set what this page checks.
Each NumericDate is A JSON numeric value representing the number of seconds from 1970-01-01T00:00:00Z UTC until the specified UTC date/time, ignoring leap seconds. That is the same count as a Unix timestamp, matching the POSIX definition the RFC names, Seconds Since the Epoch. Each day in that count is exactly 86400 seconds. With T as the claim’s value in seconds:
- Days since the epoch = floor(T ÷ 86,400).
- Seconds into that day = T minus the whole days in seconds, split into hours, minutes and seconds.
- Moving the epoch’s calendar date forward by that many days gives the date.
Four checks then run on the decoded header and claims. Two rest on the IETF’s JSON Web Algorithms standard, which defines the alg values, including none.
| Warning | Shown when | RFC rule behind it |
|---|---|---|
| Unsigned (alg “none”) | alg is missing, or reads none in any letter case | RFC 7518, section 3.6: Implementations MUST NOT accept Unsecured JWSs by default |
| The signature part is empty | The third part is blank and alg isn’t none | RFC 7518, section 3.6: only an unsecured token MUST use the empty octet sequence as its JWS Signature value |
| No exp claim | exp is missing or isn’t a JSON number | RFC 7519, section 4.1: a time claim MUST be a number containing a NumericDate value |
| Not valid before | nbf is later than your device’s clock | RFC 7519, section 4.1.5: the time MUST be after or equal to the not-before date/time |
Source: IETF RFC 7518 and RFC 7519; trigger conditions from the tool’s decode code
The JWT standard makes exp optional: Use of this claim is OPTIONAL. A warning still appears, because such a token never expires on its own. “Expiry” compares exp with your device’s clock, and the RFC draws the same line: the current date/time MUST be before the expiration date/time listed in the “exp” claim.
Every one of these steps shows up in the sample.
JWT Decoder Example: The Sample Token
The sample token is 236 characters long, in three parts of 36, 163 and 35 characters. Its header decodes to {“alg”:”HS256″,”typ”:”JWT”}, so “Algorithm (alg)” reads HS256 and “Type (typ)” reads JWT.
The payload decodes to six claims, {“sub”:”user-1234″,”iss”:”https://auth.example.com”,”aud”:”example-app”,”iat”:1700000000,”exp”:1700003600,”role”:”reader”}. “Subject (sub)” and “Issuer (iss)” show the sub and iss values. Neither aud nor role has a result line, so both appear only in “Every claim”.
NumericDate math turns both times into dates. The iat value of 1,700,000,000 is 19,675 whole days and 80,000 seconds after the epoch, so “Issued at (iat)” reads 2023-11-14 22:13:20 UTC. The exp value of 1,700,003,600 lands on the same day, 83,600 seconds in.
That’s 23:13:20, so “Expiry” reports Expired on 2023-11-14 23:13:20 UTC. Between issue and expiry, the token lived 3,600 seconds, one hour. Its header names an algorithm, its signature part is not empty, and it carries an exp and no nbf. “Warnings” therefore reads None found in the header and claims.
The signature part decodes to the 26-byte text example-signature-not-real.
What the Result Means
A clean decode means the token is well formed and readable. It doesn’t mean the token is genuine, unaltered or still accepted by the service that issued it.
“Expiry” answers one question: has the exp time passed on your clock? A server may still reject an unexpired token, because it checks the signature, the issuer and the audience as well. “Warnings” covers the header and claims problems that show without a key.
Token hijacking and weak expiry policies both appear among the breach patterns in our API security breach statistics. When “Warnings” lists something, fix it where the token is issued, not in the token.
Decoded Is Not the Same as Verified
This decoder reads claims. It never checks the signature that binds them, and that gap is easy to miss. Its own sample proves the point: its signature is plain text, and the tool reports nothing wrong.
HS256 means HMAC with SHA-256: a shared secret and a hash produce the signature. Over the same header and payload, a real HS256 signature made with a test key gave a 32-byte signature.
Next came a forgery test, run on 9 October 2026. We changed role from reader to admin in that test-key token and kept its signature. Python’s HMAC check returned True for the original token and False after role was changed to admin. The decoder showed role admin and None found in the header and claims.
The JWT standard is plain about it: The contents of a JWT cannot be relied upon in a trust decision unless its contents have been cryptographically secured. The IETF’s JWT Best Current Practices record the classic failure: The algorithm can be changed to “none” by an attacker, and some libraries would trust this value. To verify a JWT, check it in your own code with the issuer’s key.
What a JSON Web Token Contains
A JSON Web Token is a set of claims. The JWT standard calls it a compact, URL-safe means of representing claims to be transferred between two parties. Those claims form a JSON object that is used as the payload of a JSON Web Signature (JWS) structure or as the plaintext of a JSON Web Encryption (JWE) structure.
Inside the header sit the algorithm and the token type. The payload carries registered claims such as sub (the subject), iss (the issuer), aud (the audience) and the three times, plus any custom claims the issuer adds, such as the sample’s role. Claims like these are the identity data that login systems pass around, tracked in our digital identity statistics.
A signed token keeps its claims readable, which is why a decoder needs no key.
Signed JWT vs Encrypted JWT
A signed JWT and an encrypted JWT look different at a glance. The IETF’s JSON Web Encryption standard notes that JWSs have three segments separated by two period (‘.’) characters. By contrast, JWEs have five segments separated by four period (‘.’) characters.
This decoder reads the signed, three-part kind only. Paste an encrypted token and it answers A JWT has three parts separated by dots: header.payload.signature. That is expected: an encrypted token’s claims are ciphertext, and only the recipient’s key opens them.
For signed tokens, the most common surprise is the expiry.
Why the Expiry Check Allows No Leeway
This decoder applies no leeway: “Expiry” reads expired as soon as your device’s clock passes exp. A server may be more forgiving, since the JWT standard allows it.
The standard’s wording is Implementers MAY provide for some small leeway, usually no more than a few minutes, to account for clock skew. A token can read expired here and still pass at a server that grants a few minutes. A fast device clock pushes it the other way.
Type matters too. In our probe, an exp written as the JSON string `”1700003600″` came back as No expiry claim (exp): the token never expires on its own. “Every claim” still listed the value, with no date beside it.
An exp written in milliseconds is the opposite trap. Our probe’s value was 1,000 times the seconds figure, and it returned Not expired; expires +055840-12-20 14:13:20 UTC with no warning. If “Expiry” shows a date tens of thousands of years away, the issuer wrote exp in milliseconds; a NumericDate counts seconds.
Can I decode a JWT without the secret key?
Yes. A signed token’s header and payload are only base64url-encoded JSON, so anyone holding the token can read them without a key.
Only the signature needs a key. Checking it needs the shared secret for an HMAC algorithm such as HS256, or the issuer’s public key for RS256 or ES256. This page never asks for either, so “Signature” always reports that it was not checked. The same openness is why a token should carry nothing its holder must not read.
Is it safe to paste a JWT into an online decoder?
It depends on the token and on where the page sends it. The JWT standard warns that A JWT may contain privacy-sensitive information, and a live token can act as a login for as long as it lasts.
This decoder reads the token in your browser, and nothing you enter reaches our server. Nor is the token put in a page link or remembered between visits. “Copy all details” leaves it out, though the CSV holds the claim values.
Decode test or expired tokens where you can, and treat a live production token like a password. Never paste one into a page you reached from an unexpected email; how phishing works shows the usual lures.
Good to Know Before You Use It
The JWT decoder runs in your browser, and nothing you enter reaches our server. Pasted text is assumed to be one signed token in compact form: three base64url parts joined by dots, with a JSON header and payload. Times are read as seconds since the epoch and compared with your device’s clock, with no leeway.
The method follows the IETF’s JSON Web Signature standard for the token’s layout and the JSON Web Token standard for its claims and times. It decodes signed tokens only, not encrypted ones, and it never verifies the signature, so an edited token still decodes. Audience checks, issuer trust and issue times set in the future sit outside it too.
SQ Magazine publishes this page for information. Reading a token’s claims helps reduce the risk of trusting one you haven’t inspected. It promises no security outcome, and a clean decode doesn’t mean any server will accept the token.
Conclusion
The sample token decodes to an HS256 header and six claims and shows Expired on 2023-11-14 23:13:20 UTC, 3,600 seconds after it was issued. Its signature is fake, and the decoder can’t tell. Paste your own token to read its claims and expiry, then verify it in code with the issuer’s key before trusting it. Token checks belong on the same list as the rest of securing a business against cyber attacks.
























































