Maaz Zindani

Loading the index…

↑↓ move↵ openesc close3993 pages

Free tool · Developer tools

JWT decoder

Paste a JSON Web Token to read its header and payload, see exp, nbf and iat as dates, and check whether it has expired. It decodes only: the signature is not verified, and the token never leaves your device.

  • Free
  • No sign-up
  • Runs in your browser

By Maaz Zindani · Updated

The token is decoded in this page only. It is not sent anywhere, not stored, and gone when you reload. A live production token still deserves care: do not paste one into a site you do not trust.

Decoded token

ExpiredThe exp claim was 2023-11-14 23:13:20 UTC, 3 years ago.

The signature is not verified. This page only decodes the token. A decoded token is not proof that it is genuine, and the expiry check below is only a comparison with your device clock.

    Header
    { "alg": "HS256", "typ": "JWT" }
    Payload
    { "sub": "1234567890", "name": "Sample User", "role": "demo", "iat": 1700000000, "exp": 1700003600 }
    Claims
    ClaimValue
    subSubject: who the token is about1234567890
    expExpiration time: the token must not be accepted at or after this moment1700003600: 2023-11-14 23:13:20 UTC, 3 years ago
    iatIssued at: when the token was created1700000000: 2023-11-14 22:13:20 UTC, 3 years ago
      Algorithm
      HS256: HMAC using SHA-256
      Type
      JWT
      Key ID (kid)
      -
      Signature
      26 bytes, not verified

      How to use the JWT Decoder

      1. Paste the token into Paste your JWT, or press Use a sample token. A leading Bearer is ignored.
      2. Read the status at the top: Expired, Not expired, Not valid yet or No expiry, with the date it is based on.
      3. Check the Header and Payload as formatted JSON, and the Claims table for exp, nbf, iat, iss, sub, aud and jti.
      4. Press Copy payload, Copy header or Download. A red message names the part that cannot be read.

      How do I decode a JWT?

      Paste the token into the box. A JSON Web Token is three parts joined by dots, header.payload.signature. The first two are JSON written in Base64URL, the URL-safe form of Base64 without = padding (RFC 7515, section 7.1). The tool splits the token, decodes each part and prints the header and payload as formatted JSON. A leading Bearer from an Authorization header, quotes around the token and line breaks are ignored. Numbers are printed exactly as written. If a part is not valid Base64URL or not JSON, the message says which part and where.

      Base64URL is an encoding, not encryption, so anyone who holds a token can read its payload. That is by design: the signature lets a receiver detect changes, it does not hide the content. A token with five parts instead of three is an encrypted JWE, whose payload cannot be read without the key, so for that the tool shows only the header.

      What is inside a JWT header and payload?

      The header describes the token. alg names the signing algorithm: HS256 is HMAC using SHA-256, RS256 is RSASSA-PKCS1-v1_5 using SHA-256, ES256 is ECDSA using P-256 and SHA-256 (RFC 7518, section 3.1), and none means no signature. typ is usually JWT and kid hints at which key signed it. The payload holds the claims. RFC 7519 registers seven: iss (issuer), sub (subject), aud (audience), exp (expiration time), nbf (not before), iat (issued at) and jti (a unique id). The Claims table lists those that are present with their meaning. Anything else, such as a name or a role, is a custom claim: it is counted and appears in the payload.

      A header with "alg": "none", or an empty third part, is an unsigned token. The tool warns about it, because anyone could have written such a token.

      How do I check when a JWT expires?

      exp, nbf and iat are NumericDate values: the number of seconds since 1970-01-01 00:00:00 UTC. The tool writes each one as a UTC date with a phrase such as "3 years ago". The status compares them with your device clock the way RFC 7519 asks: the current time must be before exp, and at or after nbf. So an exp of 1700003600 reads as 2023-11-14 23:13:20 UTC, and the sample token shows Expired.

      A value such as 1700003600000 has three digits too many: it is in milliseconds, which some libraries write by mistake, and the tool says so. Servers often allow a small leeway for clock differences, which RFC 7519 describes as usually no more than a few minutes, so a token that is seconds past its expiry may still be accepted by one and refused by another.

      Is it safe to paste my JWT into an online decoder?

      On this page the token is decoded by code running in your browser. Nothing is sent to a server, nothing is stored, and the token is gone when you reload. A token is still a credential: whoever holds a live one can use it until it expires. Prefer an expired or test token, and do not paste a production token into any site you do not trust. The three parts are plain Base64URL, so you can also decode one offline with a few lines of code.

      How do I verify a JWT signature?

      This tool does not, and a decoded token is not proof that it is genuine: anyone can write a header and payload that look right. Verifying needs a key. For HS256 it is the shared secret, and for RS256 or ES256 it is the issuer's public key. The verifier recomputes the signature over the first two parts and compares it with the third. Use a maintained JWT library on your server, and choose in your own code which algorithms you accept instead of trusting the alg in the token: RFC 7519, section 7.2, says applications decide which algorithms are acceptable and should reject a token that uses an unacceptable one, even if it validates. Then check iss, aud, exp and nbf.

      Questions

      How do I decode a JWT?

      Paste it into the box. The header and payload are Base64URL-encoded JSON, so they are decoded and shown as formatted JSON. No key is needed to read them.

      What is inside a JWT?

      A header (the algorithm, type and key id), a payload of claims such as iss, sub, aud, exp, nbf, iat and jti, and a signature. The first two are readable by anyone.

      How do I check when a JWT expires?

      Read the exp claim: seconds since 1970 in UTC. The tool shows it as a date and compares it with your device clock, so you see Expired or Not expired.

      Is it safe to paste my JWT into an online decoder?

      Here it is decoded in your browser and never sent or stored. A live token is still a credential, so use expired or test tokens and avoid sites you do not trust.

      Does this tool verify the signature?

      No. It only decodes. Verifying needs the secret or public key and should be done in your server code with a JWT library.

      Is a JWT encrypted?

      Usually not. A signed JWT is readable by anyone who has it. Only an encrypted JWE, which has five parts, hides its payload.

      How this page was made: the tool's results are computed in your browser by the code on this page, using the sources listed above; the explanations were drafted with AI help and checked against the tool's own output.