JWT Decoder

Paste a JSON Web Token to read its header and claims, see exactly when it expires, check it for risky settings, and optionally verify its signature. Everything happens in your browser.

A leading "Bearer ", an Authorization header line, quotes and line breaks are removed for you.

Runs entirely in your browser. Nothing you type or upload is sent to a server.

What is inside a JWT

A JSON Web Token is three pieces of text joined by dots: header.payload.signature. The header and payload are small JSON documents that have been turned into Base64URL, an alphabet of letters, digits, hyphens and underscores that survives being placed in a URL or HTTP header. The signature is binary data produced by a cryptographic algorithm, also Base64URL encoded. A decoder reverses the encoding of the first two parts and pretty-prints the JSON. No key is needed for that, because nothing is hidden.

The header describes the token. Its alg field names the signing algorithm, typ is usually JWT, and kid says which key was used so the server can choose the right one. The payload carries the claims, which are statements about the user or session.

The standard claims

ClaimMeaningWhat to check
issIssuer, the party that created the tokenMust equal the issuer you trust
subSubject, usually the user IDStable identifier, not an email that can change
audAudience, the service the token is meant forYour service must be listed, or a token for another API could be replayed against yours
expExpiration time, in seconds since 1970Reject at or after this moment
nbfNot valid beforeReject until this moment
iatIssued atUseful for lifetime checks and forced re-login
jtiUnique token IDLets a server revoke or detect replay of one token

Beyond these, issuers add their own claims, such as scope, email, roles and name. The decoder labels the ones it recognizes. All the time claims are counted in whole seconds, not milliseconds. A token whose exp is a 13-digit number was almost certainly built with JavaScript's Date.now() and will look valid for millennia to a strict library.

Decoding is not verifying

Reading a token tells you what it claims. Only checking its signature with the right key tells you the claim is true.

Because the payload is public and the format is simple, anyone can type a token that says "admin": true. What they cannot do is produce a valid signature for it without the secret or private key. Servers prove authenticity by recomputing the signature over the first two parts and comparing. The verification panel above does the same: HMAC algorithms (HS256, HS384, HS512) need the shared secret, while RSA (RS and PS), elliptic curve (ES) and EdDSA tokens need the issuer's public key as PEM, a certificate, or a JWK. If you do not have the key, the page can still read the token but should not be treated as proof of anything.

Red flags the decoder looks for

Algorithm none. An unsigned token. Any server that accepts one has no authentication at all. No expiry. A stolen token never ages out. A very long lifetime. More than 30 days between issue and expiry gives a thief a long window. jku, x5u or jwk in the header. These let the token point at, or carry, the key used to check it. A server that follows them without a strict allowlist will verify a forgery signed by the attacker's own key. Sensitive data in the payload. Passwords, card numbers and national ID numbers do not belong in something readable by anyone who holds it. A short HMAC secret. RFC 7518 requires an HS256 key of at least 32 bytes. A short or common secret can be recovered offline by trying guesses against a single captured token, which is why a secret like secret is as good as none.

Algorithm choice in practice

HMAC is the simplest: one secret signs and verifies, which suits one service talking to itself. The catch is that every verifier can also forge tokens. With RS256, ES256 or EdDSA the issuer keeps a private key and publishes a public one, so any number of services can verify tokens without being able to mint them. ES256 and EdDSA produce much shorter signatures than RSA at similar strength. Whichever you choose, the verifying code should fix the expected algorithm in configuration instead of reading it from the token, since the token is the thing being checked. Otherwise an attacker can switch an RS256 token to HS256 and sign it with the public key, which the server knows, or switch it to none.

When a token will not decode

The usual causes are copying the word Bearer along with the token (this tool strips it), a truncated copy from a log line, quotes or line breaks added by a terminal, and pasting a session ID that is not a JWT at all. Five parts means an encrypted token, which cannot be read without its key. For related developer utilities, see the Base64 converter, the JSON formatter and the cron expression explainer.

Frequently Asked Questions

Decoding and signature checks both run in your browser, and the token is never sent to a server. Even so, treat a live token like a password: anyone who has a valid, unexpired token can usually act as you. For production tokens, prefer decoding on a machine you control, or paste a token that has already expired.
A header, a payload and a signature, separated by dots. The header says how the token is signed, the payload holds the claims such as who the user is and when the token expires, and the signature lets a server confirm that neither of the first two was altered. The first two parts are Base64URL-encoded JSON, so anyone can read them.
Yes. The header and payload are only encoded, not encrypted, so any decoder can read them without a key. The secret or public key is needed only to check the signature. This is why you should never put passwords or private data in a JWT payload.
exp is the expiration time, written as the number of seconds since 1 January 1970 UTC. A server must reject the token at or after that moment. The decoder shows it as a local date and a plain description such as expires in 3 hours.
Decoding just reads the contents. Verifying recalculates the signature with the correct secret or public key and compares it to the one in the token. Only verification shows the token was issued by the holder of the key and has not been changed. A decoded token that has not been verified should not be trusted.
A five-part token is an encrypted JWT, called a JWE. Its payload is ciphertext, so it cannot be read without the decryption key. The decoder can still show the protected header, which names the key management and encryption algorithms.
It marks a token as unsigned. A server must never accept such a token for authentication, because anyone can write one with any claims. Attacks have worked by changing the header of a real token to none and deleting the signature, against libraries that obeyed the header. Verifiers should require a fixed list of allowed algorithms.
The common causes are the wrong secret or key, a secret that is Base64 encoded when you entered it as text (or the reverse), a key that belongs to a different environment, or a token whose header or payload was modified. For ES256, ES384 and ES512 tokens the signature must be the raw r and s values, not the DER format that some tools produce.
The Internet Omni-Tool