Skip to content
ToolZone

JWT Decoder

Decode a JSON Web Token into its header and payload sections so you can inspect the claims inside without needing the signing secret.

Runs in your browser. Nothing you enter or upload leaves your device.

Paste a JWT to decode it.

Keyboard shortcuts

Run the main action
⌘ / Ctrl + Enter
Copy the result
⌘ / Ctrl + Shift + Enter
Download the result
⌘ / Ctrl + S
Paste a file or image into file tools
⌘ / Ctrl + V
Search all tools
⌘ / Ctrl + K
Show these shortcuts
?

You can also drop files anywhere on the page.

About the JWT Decoder

The JWT Decoder splits a JSON Web Token into its three parts and shows the header and payload as readable, indented JSON. It is a debugging aid for developers working with login sessions, OAuth access tokens and API authentication.

How it works

A JWT is three Base64URL strings joined by dots: header, payload and signature. The decoder splits the token on the dots and reports an error unless there are exactly three parts. For the first two, it converts Base64URL back to standard Base64 (replacing - with + and _ with /, then adding = padding), decodes the bytes as UTF-8, and parses the result as JSON.

The signature is shown as the raw Base64URL string. The JWT Decoder does not verify it, because that needs the issuer's secret or public key. It also displays timestamps such as exp and iat exactly as stored, in Unix seconds, without converting them to dates.

How to use

  1. 1

    Paste the full token (three dot-separated parts) into the input box. Leave out any Bearer prefix.

  2. 2

    Read the decoded Header and Payload panels.

  3. 3

    Check claims such as exp, iat, sub, aud and any custom roles.

  4. 4

    Use Copy on either panel to grab the JSON.

Worked examples

A standard example token

Decoding the well-known sample HS256 token.

Input
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Result
Header: {"alg": "HS256", "typ": "JWT"} Payload: {"sub": "1234567890", "name": "John Doe", "iat": 1516239022}

iat 1516239022 is January 18, 2018 at 01:30:22 UTC. The signature part is shown unchanged.

A token missing a part

The signature was cut off while copying.

Input
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIn0
Result
Invalid JWT: expected 3 parts separated by dots
Limitations
It does not verify signatures or check whether the token has expired. Encrypted tokens (JWE, five parts) are rejected as invalid. Timestamps are shown as raw Unix seconds, not converted dates.
Assumptions
The token is a signed JWS in compact form with JSON header and payload.
Privacy
The token is decoded by JavaScript in your browser and is not sent to a server or stored.

Frequently asked questions

Does decoding a JWT verify its signature?+

No. Decoding only reads the header and payload. Verifying requires the secret (for HS256) or the issuer's public key (for RS256 or ES256), and must be done by your server.

Is it safe to paste a JWT into this tool?+

The token is decoded locally and is not sent anywhere. Still, a live token is a credential, so avoid pasting production tokens on shared machines and prefer expired or test tokens when possible.

What do exp, iat and nbf mean?+

They are registered claims in Unix seconds: exp is when the token expires, iat is when it was issued, and nbf is the time before which it must not be accepted.

Why do I get an "expected 3 parts" error?+

The input does not contain exactly two dots. The token may be truncated, may include extra text, or may be an encrypted JWE with five parts.

Can I edit the payload here?+

No, this page is read-only. To create a token with your own claims for testing, use the JWT Generator.

Related tools