JWT Decoder and Security Inspector
A JWT decoder that runs in your browser and shows what's wrong with a token's claims and signing.
- Free
- No sign-up
- Your input stays in your browser
Can’t decode
Paste a token or try an example. Its header and payload appear here, with every time shown in your time zone.
Header
Payload
Signature
These checks read the token alone. They can’t see how your server verifies it, so check that against the list under “What your server must check” below.
Worth knowing
Verify the signature
Never paste a production secret into a website, this one included.
What the claims mean
Audit · Paid
Want the whole setup checked?
A review of your code, auth or AI setup, with clear findings on what to fix first.
Starts with a free 30-minute intro call, or email hello@nestedbit.com.
How to decode a JWT
A JSON Web Token is three base64url strings joined by dots: a header that names the signing algorithm, a payload of claims about the user or client, and a signature. Decoding the first two needs no key at all. That’s why anyone holding a token can read it, and why a payload must never carry secrets.
Decoding isn’t verifying. A decoded token tells you what it claims; only checking the signature with the right secret or public key tells you whether to believe it. Paste the key into the verify box above to do both here.
What the security checks look for
- Unsigned tokens:
alg: none, a missing algorithm, or an empty signature. - Well-known secrets: HS256, HS384 and HS512 tokens are tested against secrets copied from docs and tutorials, including jwt.io’s examples. A match means anyone can forge your tokens.
-
Expiry and lifetime: a missing
exp, times written in milliseconds instead of seconds, tokens issued in the future, and lifetimes far longer than an access token needs. - Who it’s from and for: missing
issandaud, and wildcard audiences. -
Header tricks: embedded keys (
jwk), key URLs (jku,x5u) and key IDs that look like file paths or SQL. - What the payload gives away: passwords, keys, card numbers and personal data, plus roles and permissions that stay stale until the token expires.
What your server must check
A token can pass every check above and still be accepted unsafely. On every request, your verifier should:
- Accept only the algorithm it expects, set in configuration, never read from the token.
- Verify the signature before trusting any claim.
- Take keys from your issuer’s key set (JWKS) or configuration, never from
jwkorjkuin the token. - Reject tokens past
expor beforenbf, with no more than a minute of clock leeway. - Check
issis your issuer andaudis this API. - Check
typ, so an ID token can’t be used where an access token is expected.
Common token errors
-
“jwt expired”: the token’s
exptime has passed. The guide covers each cause and its fix. - “jwt audience invalid”: the token was issued for a different service. The guide covers each provider’s causes.
For what every claim in a token means, see JWT claims, explained.
HS256, RS256, ES256 or EdDSA?
HS256 signs and verifies with one shared secret, which suits a single service that both issues and checks its own tokens. Once a second service verifies tokens, switch to a public-key algorithm: ES256 or EdDSA give short signatures and fast verification, and RS256 is the most widely supported. Only the issuer holds the private key, and every other service gets the public key from your JWKS.
Questions
Is it safe to paste a JWT here?
The token is decoded and checked in your browser. It isn’t sent to NestedBit or anyone else, and it isn’t stored or put in the address bar. Still, a live token works like a password until it expires, so use a test token or an expired one where you can.
Does decoding a JWT verify it?
No. Anyone can decode a JWT, because the header and payload are only base64url-encoded. Verifying checks the signature with the secret or public key. Paste the key into the verify box to do both.
How do I decode a JWT in code?
Use your JWT library’s decode helper: decodeJwt in jose, jwt.decode in jsonwebtoken, or jwt.decode with verify_signature turned off in PyJWT. By hand, split the token at the dots and base64url-decode the first two parts. Decoding doesn’t check the signature, so never use a decoded token to decide what someone may do.
What’s the difference between a JWT decoder and a JWT debugger?
Nothing, in practice. “JWT debugger” is the name jwt.io gave its decoder. Both decode the header and payload, and verify the signature when you give them a key. This one also checks the token for security mistakes, such as well-known secrets, missing claims and long lifetimes.
Which signing algorithm should I use?
Use ES256, EdDSA or RS256 when more than one service verifies tokens, so only the issuer holds the private key. HS256 is fine inside a single service, with a random secret of at least 256 bits.
Can this tool tell me if my secret is strong?
It tests HS256, HS384 and HS512 tokens against secrets that appear in docs and tutorials, such as jwt.io’s examples. A match means anyone can forge your tokens. No match doesn’t prove the secret is strong; only how it was generated can.