JWT Decoder
Decode a JSON Web Token into its header, payload and signature. See every claim, the issue and expiry times as dates, and warnings for expired or unsigned tokens.
How to Use
- Paste a token into the box. A leading
Bearer, spaces and line breaks are removed for you. - The token is split at its two dots and coloured: header, payload and signature. Both JSON parts are decoded as you type.
- Read the claims table:
iat,nbfandexpare shown as UTC dates with how long ago or how far ahead they are, and expired tokens are flagged. - Check the warnings:
alg“none”, a missing expiry or a signature of the wrong length for its algorithm. - Press Copy payload or Copy header for the formatted JSON, and read Show Work for each decoding step.
JWT Decoder
Header
Payload
Claims
Worked Example
Decode the classic sample token (155 characters):
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Split at the two dots: 36 + 74 + 43 characters.
Header: 36 base64url characters → ⌊36 × 3 / 4⌋ = 27 bytes = {"alg":"HS256","typ":"JWT"}.
Payload: 74 characters → ⌊74 × 3 / 4⌋ = 55 bytes = {"sub":"1234567890","name":"John Doe","iat":1516239022}.
Signature: 43 characters → ⌊43 × 3 / 4⌋ = 32 bytes = 256 bits, exactly the size of an HMAC-SHA-256 result, so it fits HS256.
iat = 1516239022 seconds after 1 January 1970 = 18 January 2018, 01:30:22 UTC. There is no exp, so this token never expires — a warning sign for a real system.
The common mistake: passing the claim straight to JavaScript’s new Date(1516239022). That constructor expects milliseconds, so the result is 18 January 1970, 13:10:39 UTC — 48 years too early. Multiply by 1000 first. A second mistake is believing a decoded token is a trusted one: the signature above only proves anything to someone holding the secret (here, the string your-256-bit-secret).
Show Work
Formulas
Where JSON Web Tokens Came From
JWT was published as RFC 7519 in May 2015 by Michael Jones, John Bradley and Nat Sakimura, alongside the rest of the JOSE family: JWS (RFC 7515) for signatures, JWE (RFC 7516) for encryption, JWK (RFC 7517) for keys and JWA (RFC 7518) for the algorithm names such as HS256 and RS256. Its first big user was OpenID Connect, whose ID tokens are JWTs. The usual pronunciation is “jot”.
The idea is a self-contained token: a server can check the signature with a known key and trust the claims without a database lookup, which suits single-page apps and services spread over many machines. The flexibility caused trouble. In 2015 Tim McLean showed that several libraries accepted "alg":"none" tokens, or could be tricked into checking an RS256 token with the public key as an HMAC secret. RFC 8725 (2020), the JWT best-practice guide, now tells verifiers to fix the algorithm, check exp, iss and aud, and never trust the header’s choice of algorithm.
About This Tool
This decoder splits a JWT at its dots, turns each base64url part back into bytes and parses the header and payload as JSON. Time claims are converted to UTC dates with the time left or elapsed, and the page warns about expired, not-yet-valid and unsigned tokens, values that look like milliseconds, and signatures whose length does not fit the declared algorithm. A five-part token is recognised as an encrypted JWE, whose payload cannot be read without the key.
The signature is shown and measured but deliberately not verified: that needs the signing key, and it belongs on your server. Everything runs in your browser and the token is never uploaded.
Related tools: Base64 Encoder / Decoder, Unix Timestamp Converter, and JSON Formatter.
Frequently Asked Questions
Does this verify the signature?
No. Checking a signature needs the key: the shared secret for HS256, or the issuer’s public key for RS256 and ES256. This page only decodes, so anyone can read a JWT’s claims but no one can trust them until a server has verified the signature with a vetted library and an allow-list of algorithms.
Is it safe to paste a real token here?
The token is decoded by JavaScript in your browser and is never sent anywhere. A deep link such as #token=eyJ… keeps it in the URL fragment, which browsers do not send to the server. Still treat a live token like a password: anyone holding it can use it until it expires.
What do exp, iat and nbf mean?
They are times in whole seconds since 1 January 1970 UTC. iat is when the token was issued, nbf is the earliest time it may be used and exp is when it stops being valid. 1516239022 is 18 January 2018, 01:30:22 UTC. Read as milliseconds by mistake it becomes 18 January 1970, which is why this page flags values above 100 billion.
Why is alg “none” dangerous?
It declares an unsigned token: the third part is empty. In 2015 several libraries were found to accept such tokens when the header said "alg":"none", so anyone could write their own claims, for example "role":"admin". Servers must fix the expected algorithm in code and reject none outright.
How long should the signature be?
It depends on the algorithm. HS256 gives 32 bytes, which is 43 base64url characters. RS256 with a 2048-bit RSA key gives 256 bytes, or 342 characters. ES256 gives 64 bytes, or 86 characters. This page compares the length with the alg in the header and warns when they do not fit.
Common Use Cases
A sudden 401 from an API
Paste the bearer token: an exp of 1700003600 means it died on 14 November 2023 at 23:13:20 UTC, and the page shows how long ago.
Checking token lifetime
Confirm a token lives as long as the spec says: exp − iat = 3600 s is a one-hour access token.
Identity provider tokens
Read the iss, aud and kid of an Auth0, Okta, Cognito or Entra ID token to find which key and audience a server expects.
Security review
Spot alg “none”, tokens with no expiry, or personal data in the payload, which anyone holding the token can read.
OpenID Connect debugging
Decode an ID token during a login flow to check the subject, audience and nonce before the app accepts it.
Last updated: