JWT Decoder
Paste a JSON Web Token to read its header and claims, see when it expires, and verify HMAC signatures.
How a JWT is built
A signed JWT is three base64url segments joined by dots: header.payload.signature. The header and payload are ordinary JSON objects. The signature is computed over the first two segments, so changing a single character of the payload invalidates it.
header {"alg":"HS256","typ":"JWT"}
payload {"sub":"1234567890","name":"Ada Lovelace","iat":1763683200,"exp":1763686800}
signature HMAC-SHA256(base64url(header) + "." + base64url(payload), secret)Decode a JWT in code
Decoding is enough for reading claims in a browser or a debugging script. Anything that grants access must verify.
// Browser or Node.js 16+: read the payload (does NOT verify)
const payload = JSON.parse(
new TextDecoder().decode(
Uint8Array.from(atob(token.split(".")[1].replace(/-/g, "+").replace(/_/g, "/")), c => c.charCodeAt(0))
)
);
# Python with PyJWT: verify and decode
import jwt
claims = jwt.decode(token, key, algorithms=["HS256"], audience="my-api")Always pass an explicit algorithms list when verifying, so a token cannot switch itself to none or to a different algorithm.
The payload is plain JSON, so you can paste it into the JSON viewer to explore nested claims, or decode other base64 data with Base64 to JSON.
Need to read or debug JSON from this result? Paste it into the JSON beautifier to format, validate and explore it as a tree.
Frequently Asked Questions
Is it safe to paste a JWT here?
Decoding happens in JavaScript in your browser and the token is not sent to any server. Even so, treat a live access token like a password: prefer test or expired tokens, and never paste a production token into a site you do not trust.
Does decoding a JWT verify it?
No. Anyone can decode a JWT, because the header and payload are only base64url-encoded, not encrypted. A token is trustworthy only after its signature is verified with the right key, and its exp, nbf, iss and aud claims are checked on the server.
Which signatures can this tool verify?
HMAC tokens (HS256, HS384, HS512) when you enter the shared secret. RS256, ES256 and other public-key algorithms need the issuer's public key and should be verified in your backend with a JWT library.
What do exp, iat and nbf mean?
They are NumericDate claims in seconds since 1 January 1970 UTC. iat is when the token was issued, nbf is the earliest time it may be used, and exp is when it expires. The tool shows each as a UTC date and flags expired tokens.
Why does my token have five parts?
A five-part token is an encrypted JWT (JWE). Its payload is ciphertext and cannot be read without the decryption key, so this decoder will not show it.