Search DevTools

Jump to any tool or page

JWT Encoder / Decoder

Encode and decode JWTs (JSON Web Tokens) with ease.

Token

paste a JWT

Decoded

Decoded token will appear here after decoding.

Developer Utilities

About JWT Decoder

Decode a JSON Web Token into its three parts — header, payload, and signature — to inspect claims, algorithm, and expiry. Decoding is not verification: the payload of any JWT is readable by anyone holding the token, which is precisely why it must never carry secrets.

Frequently asked questions

Does decoding a JWT verify that it is valid?
No, and conflating the two is a common security mistake. A JWT's payload is Base64URL-encoded, not encrypted, so any party can decode it without a key. Verification means recomputing the signature with the issuer's secret or public key and confirming it matches — that requires the key material and must happen server-side. Treat anything decoded here as unverified user input.
Why is the payload readable? Is that a flaw?
It is by design. A signed JWT (JWS) guarantees integrity — proof the contents were not altered — not confidentiality. Anyone intercepting the token reads its claims. If you need the contents hidden, you need JWE (encrypted JWT) instead, or simply keep sensitive data out of the token and store it server-side behind an opaque session identifier.
What do exp, iat, nbf, iss, and aud mean?
These are registered claims from RFC 7519. exp is expiry and iat is issued-at, both NumericDate values — seconds since the Unix epoch, not milliseconds, which is a frequent source of off-by-1000 bugs in JavaScript where Date.now() returns milliseconds. nbf is not-before, marking when the token becomes valid. iss identifies the issuer and aud the intended recipient; a verifier that ignores aud may accept a token minted for an entirely different service.
What is the alg: none vulnerability?
The JWT header declares its own signing algorithm, so a naive verifier that trusts that field can be told the token is unsigned. An attacker rewrites the payload, sets alg to none, strips the signature, and a library configured to honour the header accepts it. The same class of attack swaps RS256 for HS256 so the public key gets used as an HMAC secret. Always pin the expected algorithm in your verification call rather than reading it from the token.
Can I revoke a JWT before it expires?
Not through the token itself. JWTs are stateless and self-contained, so a valid signature is accepted until exp passes — that is the core trade-off for avoiding a session lookup. Practical revocation requires reintroducing state: a server-side denylist of token identifiers (the jti claim), short expiry paired with refresh tokens, or a per-user token version that invalidates all outstanding tokens when incremented.