LocalExcelTool
Get started

JWT Decode

Inspect the header and payload of a JSON Web Token.

Runs in your browserNo account neededFree

What is JWT Decode

JWT decoding expands the Base64-encoded header and payload of a JSON Web Token into readable JSON. It does not verify the signature.

🔒 Everything runs in your browser. Nothing is uploaded.

What this tool actually does with your file

Where it runs
In your browser, on this page
Upload
None — the file never leaves your device
Offline
Works with the network disconnected

Decoding is reading, not verifying

A JWT is three Base64url segments separated by dots: header, payload, signature. This tool decodes the first two and shows them as JSON. It does not check the signature, because doing so requires the issuer's key, which a client-side page cannot be trusted with.

That distinction is the most exploited misunderstanding in web auth. A token whose payload says "role":"admin" is not proof of anything until the signature has been verified against a known key. Services that decode and trust the payload have shipped privilege escalation more than once.

The timestamps are in seconds

exp, iat and nbf are NumericDate values — seconds since the Unix epoch, per RFC 7519. JavaScript's Date.now() returns milliseconds, so a naive comparison marks every fresh token as expired or treats a 1970 token as valid far into the future. Multiply by 1000 before building a Date.

Also check which claims are actually present. exp is optional, and a token without it never expires on its own; aud and iss are what bind a token to a particular service and issuer. A token that decodes cleanly can still be for a different audience, which is a valid signature on the wrong door.

Reading the pieces that look wrong

The segments are Base64url: - and _ instead of + and /, and no = padding. Pasting a standard-Base64 variant into a decoder that expects Base64url produces garbage in the header rather than an error, and the payload often still parses — which makes the corruption easy to miss.

The header's alg field is attacker-controlled data, not a security decision. The classic alg:none attack sets it to none and omits the signature; a verifier that honours the header's own claim about which algorithm to use accepts the forged token. Fix the acceptable algorithms on the server side and reject anything else.

How to use it

  1. 1.Paste a JWT
  2. 2.Decode
  3. 3.Inspect payload

How JWT Decode works under the hood

Encoding tools convert between representations of the same bytes: Base64, percent-encoding, hex, HTML entities, Unicode escapes. A correct encoder is reversible; a lossy one silently changes the data.

  1. 1

    Get the exact bytes

    Text is encoded to UTF-8 bytes with TextEncoder first; binary input is read as an ArrayBuffer. Encoding the wrong byte sequence is the most common cause of a wrong result.

  2. 2

    Apply the encoding rule

    Each format has an exact specification: Base64 uses a 64-symbol alphabet with padding, percent-encoding escapes reserved characters as UTF-8 bytes.

  3. 3

    Decode back to verify

    Round-tripping the output back to the input is the only honest proof that an encoder is correct. The tool keeps the reverse path available on the same page.

  4. Processing pipeline

Base64 is not encryption

Base64 increases size by about a third and hides nothing: anyone can decode it. It exists to carry binary data through text-only channels such as JSON, email headers and data URLs. If you need confidentiality, use encryption with a key, not an encoding.

Where encoders break

Percent-encoding applied twice turns %20 into %2520; Base64 without padding fails strict decoders; UTF-16 input decoded as UTF-8 produces replacement characters that cannot be recovered. When output looks wrong, check the byte sequence before checking the tool.

Verify it yourself

Encoders are pure functions over bytes. Decode the output again and you should get the input back exactly.

  1. 1.Open DevTools on this page and switch to the Network tab
  2. 2.Keep the filter on Fetch/XHR and run the tool
  3. 3.Confirm no request carries your file — you should see only page assets and fonts

Frequently asked questions

What is JWT decoding?

It reveals the header and payload of a token in readable form.

Does it verify the signature?

No. It only displays contents; it does not validate the signature.

Is the token uploaded?

No, decoding happens in your browser.

What this kind of conversion cannot keep

Encoding and hashing run through the browser's Web Crypto API or a pure-JavaScript implementation. The output is deterministic: the same input always produces the same digest, so you can verify a result against any other tool.

Go deeper

More in Encoding