What is JWT Decoder?
This JWT decoder shows what is inside a JSON Web Token. A JWT is three Base64URL-encoded parts separated by dots: a header that names the signing algorithm (alg) and type (typ), a payload with claims such as the subject (sub), issuer (iss), audience (aud), issue time (iat) and expiry (exp), and a signature.
Paste a token and the header and payload are decoded into formatted JSON instantly, so you can check which user, roles, scopes and expiry a token carries while debugging authentication. Decoding happens entirely in your browser, which matters because a valid token works like a password until it expires.
How to use JWT Decoder
- Copy the JWT, for example from an Authorization: Bearer header, a cookie or your browser's local storage.
- Paste it into the Encoded Token box.
- Read the decoded Header and Payload JSON.
- Convert iat and exp to dates with the Unix Timestamp Converter to check when the token was issued and when it expires.
Key features
- Decodes the JWT header and payload into formatted JSON
- Base64URL and UTF-8 aware decoding
- Clear error for malformed tokens
- Instant results as you paste
- Decoded locally; tokens are never uploaded
Common use cases
- Checking user ID, roles and scopes in an access token
- Finding out why a token is rejected, such as an expired exp or wrong aud
- Inspecting ID tokens from OAuth 2.0 and OpenID Connect providers
- Debugging tokens from Auth0, Firebase, Cognito, Keycloak or Azure AD
- Learning the structure of JSON Web Tokens
Technical details & standards
The token must have three dot-separated parts. The header and payload are Base64URL-decoded (RFC 4648, section 5), read as UTF-8 and parsed as JSON, then pretty-printed. Times such as iat, nbf and exp are NumericDate values: seconds since 1 January 1970 UTC.
Decoding is not verification. The signature is not checked here, because verifying it requires the secret (for HS256) or the issuer's public key (for RS256 and ES256); anyone can create a token with any payload, so a server must always verify the signature before trusting the claims. Use the JWT Generator to create signed test tokens.
Read a JWT expiration time without the secret
The payload of a signed JWT can be read without its signing secret. The exp claim uses Unix seconds, so convert it as seconds rather than milliseconds when debugging an expired-token response.
Example input
{"sub":"user-42","exp":1704067200}- Paste the complete three-part JWT into the decoder; the example above shows the payload to look for, rather than a complete token.
- Find exp in the decoded payload and open the linked Unix Timestamp Converter to read its UTC date. This example date is already in the past.
- Inspect issuer, audience and other claims when debugging. Reading the payload does not verify the signature or establish that the token is trustworthy; verification belongs in your application’s authentication code.
Expected result
exp 1704067200 = 2024-01-01 00:00:00 UTCContinue with a related task:
Frequently asked questions
Is it safe to paste a JWT into an online decoder?
This decoder runs entirely in your browser and sends nothing over the network. Still, a valid token grants access until it expires, so prefer test or expired tokens and never share production tokens with tools you do not trust.
Does decoding a JWT verify it?
No. Decoding only reads the Base64URL-encoded JSON. Verification checks the signature with the secret or public key, plus claims such as exp and aud, and must be done by your server or JWT library.
How do I check when a JWT expires?
Read the exp claim in the payload. It is a Unix timestamp in seconds; paste it into the Unix Timestamp Converter to see the date and time. The token is invalid after that moment.
Can I decode a JWT without the secret?
Yes. The header and payload are only encoded, not encrypted, so anyone can read them. The secret is only needed to create or verify the signature. Never put sensitive data in a JWT payload unless it is encrypted (JWE).
How do I decode a JWT locally or in code?
This decoder already works locally: the token is decoded in your browser and never sent anywhere, and the page keeps working offline once loaded. In code, take the second dot-separated part and Base64URL-decode it: JSON.parse(Buffer.from(token.split(".")[1], "base64url").toString()) in Node.js, or jwt.decode(token, options={"verify_signature": False}) with PyJWT in Python. Verify the signature before trusting the claims.
Is my data safe?
Processing happens locally in your browser. Tool input is not sent to CodeUnpack servers.
Does it work offline?
Once the page has loaded, this tool can process input without an internet connection.