JWT Decoder
Paste a JWT to read its header and claims, see when it expires, get warnings and check the signature, all on your device.
Last checked
Paste a token
The token is decoded in this tab. It is never sent anywhere, so it is safe to paste a real one. Bearer and quotes around it are ignored.
Make a token (HS256, HS384, HS512)
Enter a secret to see the signed token.
Signed in this tab with Web Crypto. Use it for tests and local development, not for production secrets.
- Header and payload as readable JSON
- Dates written out, with expired or valid shown
- Warnings about alg none, missing exp and untrusted header keys
- Signature check for HS, RS, PS, ES and EdDSA, with PEM, certificate, JWK or JWKS keys
- Make and sign your own HS256 test tokens
- Nothing leaves your device, so real tokens are safe to paste
How to use it
- Paste the token. A leading Bearer and quotes around it are ignored.
- Read the header, the payload and the claims. The summary at the top says whether it has expired.
- To check the signature, enter the secret for an HS token (tick Secret is Base64 if it was issued that way), or paste the public key, certificate or JWKS for RS, PS, ES and EdDSA.
- To make a test token, edit the header and payload under Make a token and enter a secret.
What it checks and why
A JSON Web Token has three parts joined by dots: a header, a payload and a signature. The first two are JSON written in Base64URL, which is an encoding and not encryption, so anyone holding the token can read them. This tool decodes them and lays out the claims, with the time claims written as dates and compared with the clock.
Reading a token does not tell you it is genuine. The signature does, and checking it needs the key. For HS256 and its relatives the key is a shared secret. For RS, PS, ES and EdDSA it is the public key: a PEM block (BEGIN PUBLIC KEY or BEGIN RSA PUBLIC KEY), a certificate (BEGIN CERTIFICATE, as Google and Firebase publish them), a JWK, or the whole JWKS from an issuer's jwks_uri, in which case the key whose kid matches the token is used. The check runs in your browser with the Web Crypto API, and a valid result means the token was made with that key and has not been changed.
The warnings come from the current best practice for JWTs in RFC 8725. A token with the algorithm none is not signed at all. A token without exp never expires. A header that carries its own key, through jwk, jku or x5u, must not be trusted, because anyone could put their own key there. Because everything runs on your device, you can paste a real production token without sending it to anyone.
Specs and sources
Limits
- Encrypted tokens (JWE, five parts) cannot be read without the key and are not decoded.
- A valid signature does not make the claims right. A server must still check the issuer, the audience and the time.
- Private keys are not accepted for checking. The JWKS is pasted, not fetched: the tool makes no network requests.
- EdDSA is checked for Ed25519 only, and needs a browser with Ed25519 in Web Crypto. Ed448 and other algorithms are decoded but not verified.
- The encoder signs with HS256, HS384 and HS512 only. Use it for tests and local work, not for production secrets.
Questions
- Is it safe to paste a real JWT here?
- Yes. The token is decoded and checked in your browser and is never sent anywhere. Still, treat a live token like a password, and prefer a short-lived or test token when you can.
- Can anyone read the content of a JWT?
- Yes. The header and the payload are only Base64URL encoded, not encrypted. Never put a secret or private data in them. If the content must stay hidden, use an encrypted JWT or keep the data on the server.
- What does a valid signature mean?
- It means the token was made by someone with the key and has not been changed since. It does not mean the token is still in date, that it is meant for your service or that the user is allowed to do anything.
- Why does my HS256 token say the signature is invalid with the right secret?
- Often the secret was issued in Base64 (some identity providers do this), so the bytes that signed the token are the decoded secret, not the text. Tick Secret is Base64. Also check for a space or line break copied with the secret.
- How do I verify a JWT with a JWKS?
- Open the issuer's jwks_uri (for example from /.well-known/openid-configuration), copy the JSON and paste it as the key. The tool picks the key whose kid matches the token header and says which one it used.
- What is the alg none attack?
- Some libraries once accepted a token whose header said alg none and carried no signature, so an attacker could make any token. A server must reject it and decide the algorithm itself, not take it from the token.