JWT Parser

Web

Decode and inspect JWT tokens (header, payload, expiry) with a signature structure check. Inspect auth claims and expiry without sending secrets or keys.

Invalid
Token JWT must have 3 parts
13 chars

About JWT Parser

The usual situation when debugging authentication: the browser holds a token that looks like noise and you need to know immediately when it expires, which user it belongs to and what scopes it carries, without writing a script. A JWT parser splits the three-part token and restores readable JSON, which is how you answer "why am I logged in but told I lack permission", "has the token already expired", and "do issuer and audience match". A JWT is three dot-separated Base64URL segments: the header declaring algorithm and type, the payload carrying claims such as issuer, audience, expiry and custom fields, and the signature computed over the first two using the declared algorithm. Parsing is only Base64URL decoding plus JSON parsing and needs no key, which is exactly the crucial insight: the payload is encoded, not encrypted, so anyone can read it. Practical notes: Convert the exp, iat and nbf claims to local time before comparing, and remember they are Unix seconds, not milliseconds, or you will read 1970. Verify that iss and aud match your server configuration, which is the most common failure when integrating third-party sign-in. And treat alg: none as unsigned, since a server that accepts such a token lets anyone forge one. While debugging, compare the algorithm in the header against the allowlist your server actually accepts. Limits: A successful parse says nothing about validity. By default this tool only decodes; if you enter an HMAC key, the page can verify HS256/384/512, while RS/ES signatures still need a public key on the server. Client-side verification is only for local debugging — an attacker can rewrite payload and signature together — so production validation belongs on the server. Never treat a decoded payload as a trusted identity. The other pitfall is clock skew: if servers across regions disagree by minutes, tokens can appear expired on issue or remain accepted past expiry. Data and privacy: JWT payloads typically carry user IDs, e-mail addresses and roles, sometimes internal service hostnames and permission lists. Although anyone can decode them, pasting a real production token into an online parser hands the other party a working credential they can use against your API. This tool decodes in the browser and never transmits the token; disconnect the network first, confirm the Network panel is empty, and rotate the token on the server once you are done debugging. The surrounding standards and common variants are worth knowing. A JWT is one piece of the larger JOSE family: JWS is the signed form, which is what people normally mean by JWT, while JWE is the encrypted form whose payload is unreadable, so decoding a JWE here shows gibberish because that is by design rather than a tool failure. On signing algorithms, the HS family uses one shared secret for both signing and verifying and suits a single service, whereas RS and ES sign with a private key and verify with a public one, which fits letting third parties verify without granting signing power. The public key is usually published as JSON through a JWKS endpoint. Beyond exp, iat and nbf, the claims worth checking are sub for the subject, jti as a unique identifier that can prevent replay, and scope for the granted permissions. Align these against your server configuration one by one and almost every "the token looks fine but does not work" case resolves to a specific claim. Seen in the larger picture, a JWT is usually an artefact of an OAuth 2.0 or OpenID Connect flow: an authorization server issues it and a resource server validates it. Understanding that chain tells you which segment is at fault, whether the issuer shipped the wrong claims or the resource server is too strict, which beats staring at the token itself.

How It Works Internally

A token is three dot-separated segments: the header declares algorithm and type, the payload carries claims, and the signature is computed over the first two with the declared algorithm. Parsing does just two things — restore each segment from its URL-safe encoding, then read the first two as JSON. It therefore needs no key at all, which also means anyone can read the payload; HMAC signatures (HS256/384/512) can be verified here with the shared secret, while RS/ES need the public key on the server.

Decode the payload (readable part)
InputeyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMjMifQ.x
Output{"alg":"HS256"} / {"sub":"123"} (the signature cannot be verified without the key)

Measured on This Page

Six verification casesValid HS256, wrong secret, expired-but-correctly-signed, HS512, tampered signature and alg=none are all judged correctly
Secret agreementTokens signed by Python hmac are accepted by the page, so WebCrypto and Python agree for the same secret
UTF-8 claimsChinese keys and values (name=张三, 备注=中文 claim) render exactly, no mojibake
alg=noneExplicitly reported as unverifiable here rather than accepted
Expiry vs signatureAn expired token with a correct signature shows a valid signature and a separate expired badge

A valid signature does not mean a usable token: an expired token is still correctly signed, and this page keeps the two facts apart. The other common misreading: only HMAC (HS256/384/512) can be verified here — RS256 and ES256 need a public key and the page says so, so do not read unverified as valid.

How this was measured: Python hmac signed HS256 and HS512 tokens on the spot (including Chinese claims, an expired token, an alg=none token and a tampered signature), fed each into the page with the right or wrong secret and read the verification badge plus the decoded JSON panes. · Measured 2026-10-28

How to Use

  1. Open the JWT Parser tool
  2. Paste the complete JWT string into the input field
  3. Header and Payload are automatically decoded and displayed as JSON
  4. Check expiration time, issued at time, and other key info
  5. Enter the secret key to verify the signature (HS256/384/512 only)

Use Cases

  • Debug login state — When users report "login expired", paste the token to inspect expiry time and claims.
  • Inspect OAuth / OIDC flows — Examine claims (sub, aud, iss, etc.) inside access_token and id_token issued by an identity provider.
  • Validate token structure — Confirm a backend-issued token contains expected custom fields like user_id or role.
  • Understand third-party SSO — Study tokens issued by Auth0, Firebase, Okta, or other identity providers.
  • Troubleshoot 401 errors — Quickly see whether the token has expired (exp claim) or is not yet valid (nbf claim).
  • Custom claim validation — Verify that your backend includes expected custom claims like permissions, tenant_id, or feature flags in the token payload.
  • Token size audit — Measure the decoded payload size to identify unnecessarily large tokens that could impact request performance.

FAQ

Is a JWT encrypted?

No. JWTs are only Base64URL encoded by default (not encrypted) — anyone who gets the token can decode and read the payload. Use JWE for confidentiality, or simply do not put secrets in a JWT.

Does this tool verify the signature?

By default it only decodes and displays; enter a shared secret to verify HS256/384/512. RS/ES require a public key and are not verified here, so production systems should use jose or jsonwebtoken on the server.

How do I manually invalidate a JWT?

You cannot — without a server-side blocklist. This is an inherent JWT limitation, which is why access_tokens typically have short lifetimes (minutes) and are paired with refresh_tokens.

Are JWTs more secure than session cookies?

Not necessarily. JWTs suit stateless distributed systems, but HttpOnly + Secure session cookies are also safe. The choice depends on architecture, not security level.

Why is my JWT so long?

The bigger the payload, the bigger the token. Include only essential claims (sub, exp, aud, role). Since the token is sent on every request, oversized JWTs waste bandwidth.

Why does my access token expire so quickly?

Short-lived access tokens (minutes to an hour) are a deliberate, recommended design: they shrink the window a leaked token stays valid, and a refresh token quietly renews them before expiry to keep long sessions alive. It is not a misconfiguration. If it feels too fast, adjust the exp at issuance; the frontend should refresh on 401 or preemptively before exp instead of forcing repeated logins. Also confirm the server clock (NTP) matches issuance time, since drift can invalidate tokens instantly.

What should and should not go in the payload?

Keep it minimal and necessary: sub, exp, iat, aud, iss, role. Never put passwords, phone numbers, or other secrets — JWTs are only Base64URL encoded, so anyone who receives the token can read them. Do not trust client-editable fields such as prices or permissions; enforce them server-side and re-validate on the backend. If confidentiality is genuinely required, switch to JWE encryption or keep sensitive fields in a server session rather than in the token.

Does parsing a JWT verify its signature?

No by default — decoding is just Base64URL expansion and JSON reading, so anyone can craft a payload; only an explicitly supplied shared secret verifies HS256/384/512. "Parses fine" never means "valid": production systems must validate signature and expiry on the server.