The JWT Decoder splits a JSON Web Token into its header and payload and shows both as formatted JSON, so you can read the algorithm, user ID, scopes, and expiry claims. It is a debugging tool for developers working with OAuth, OpenID Connect, and API authentication. It decodes tokens; it does not verify signatures.
Input
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Output
Header: {"alg": "HS256", "typ": "JWT"} Payload: {"sub": "1234567890", "name": "John Doe", "iat": 1516239022}
Input
abc.def
Output
A JWT must have three parts separated by periods (header.payload.signature).
A signed JWT (a JWS in the compact format of RFC 7515 and RFC 7519) is three Base64url strings joined by periods: header.payload.signature. The decoder splits on the periods, converts each of the first two parts from Base64url to standard Base64 by swapping - for + and _ for /, adds the = padding that JWTs omit, decodes the bytes as UTF-8, and parses the result as JSON. The header and payload panels show that JSON with two-space indentation. Anything that does not have exactly three parts, or whose first two parts are not Base64url-encoded JSON, is reported as an error instead.
The third part, the signature, is not checked. Verifying it requires the secret (for HS256, HS384, HS512) or the issuer's public key (for RS256, ES256, and others), and a decoder that only reads the token cannot know whether it was tampered with. Treat everything shown here as unverified claims. Your server must always verify the signature and check exp, nbf, iss, and aud with a maintained JWT library before trusting a token. A header with "alg": "none" means the token is unsigned and should be rejected by any API.
Time claims are Unix timestamps in seconds, not milliseconds. In the example, iat 1516239022 means the token was issued on 18 January 2018 at 01:30:22 UTC. To turn exp or iat into a readable date, paste the number into the Unix timestamp converter; a token whose exp is in the past will be refused by the API even if the signature is fine. A clock difference between servers of a few seconds can also cause "token not yet valid" errors with nbf.
The payload of a signed JWT is encoded, not encrypted, which is exactly why this tool can read it. Never put passwords or secrets in claims. Decoding happens in this page and the token is not sent to a server, but a live token is still a credential: anyone who has it can use it until it expires, so avoid pasting production tokens into shared screens or tickets. Encrypted tokens (JWE) have five parts and cannot be read without the key. To create a strong HMAC secret for signing your own tokens, use the JWT secret generator.
More Developer Tools