JWT Decoder: decode a JSON Web Token
Paste a token to read its header, payload and time claims. Decoding happens in your browser. The token is never sent anywhere.
Token
What a JWT actually contains
Three parts, separated by dots. The first two are JSON, base64url-encoded. That is not encryption: anyone holding the token can read them. So a JWT should never carry a password, a card number, or anything you would not put in a log line.
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
1. Header
How the token is signed.
{ "alg": "HS256", "typ": "JWT" }2. Payload
The claims: who, what, and until when.
{ "sub": "1234567890", "name": "John Doe", "iat": 1516239022 }3. Signature
Proof of who issued it. Only the signing key can check it.
Bytes, not JSON. Nothing readable to show.
Why this page does not verify the signature
Decoding is not decryption, and it is not verification either. The signature proves the token came from whoever holds the signing key, and that nobody changed it since. Checking it needs that key. Pasting a signing secret into a web page is a bad habit, even on an honest page, so this one never asks for it.
This page tells you
- The header: algorithm and type
- Every claim in the payload
- Whether it has expired, or is not valid yet
It cannot tell you
- Whether the signature is genuine
- Whether the token was changed after it was issued
Watch outAn expired token is never usable. An unexpired one is usable only if its signature also checks out. Verify tokens in your own code, with your own key.
Names with accents, and emoji
The browser's built-in atob returns latin1. A decoder written the obvious way breaks any name with an accent, and any emoji, and it does so silently, with no error. This page decodes the bytes as UTF-8, so non-English text reads correctly.
- With
atob - José
- On this page
- José
A token is a credential
A JWT from a live system works like a password until it expires: whoever holds it can act as you. A decoder that sends the token to a server has your credential in its logs, if only for a moment.
This page decodes in your browser, and no request it makes carries the token. To check, watch the network tab for the token, or go offline and decode again.
If the payload is malformed JSON, the JSON validator gives the line and column, and the JSON error reference explains the message.