{"copy":{"explain":"A JWT is three pieces of Base64URL text joined by dots: a header (which algorithm signed it), a payload (the claims, like the user ID and expiry time), and a signature. The tool splits the token at the dots, decodes the first two parts back into JSON and shows them with colours. Times like exp, iat and nbf are seconds since 1 January 1970 (UTC), so it turns them into dates and counts down to the expiry. To check the signature it signs the header and payload again with your secret (HS256, HS384, HS512) or checks them with the public key (RS, PS and ES algorithms) using your browser's Web Crypto.","example":"eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMDI0IiwiZXhwIjoxNzk1MDAwMDAwfQ.… → header {&quot;alg&quot;:&quot;HS256&quot;}, payload {&quot;sub&quot;:&quot;1024&quot;,&quot;exp&quot;:1795000000}, and exp shown as a date in 2026 with &quot;expires in …&quot; or &quot;expired … ago&quot;.","intro":"Decode a JSON Web Token to read its header and claims, see when it expires in plain dates, and check the signature with a secret or public key.","sections":[["What is a JWT?","A JSON Web Token (JWT, said &quot;jot&quot;) is a small signed message that websites and apps use to say who you are. After you sign in, the server gives your browser or app a token, and every request after that carries it, usually in an Authorization: Bearer header. The server checks the signature instead of looking you up in a database each time. Sign in with Google, Firebase, Auth0, AWS Cognito and most modern APIs use JWTs."],["Reading the claims","The payload holds claims. Standard ones are sub (the user it is about), iss (who issued it), aud (which app it is for), exp (when it expires), iat (when it was issued) and nbf (not valid before). Apps add their own, like email, name, roles or scope. The tool lists the common ones in plain words and shows the times in Indian Standard Time on your phone, with a live countdown to expiry."],["Checking the signature","Decoding only reads the token; anyone can do that. To know the token is genuine, the signature must be checked. For HS256 tokens, paste the shared secret (tick Base64 if your secret is stored that way). For RS256, PS256 and ES256 tokens, paste the public key in PEM format, starting with -----BEGIN PUBLIC KEY-----. The tool says Signature verified, or Invalid signature if the key is wrong or the token was changed."],["Common mistakes","A JWT is not encrypted, so never put passwords, card numbers or Aadhaar numbers in the payload. Always check the signature on the server and never accept alg &quot;none&quot;. Keep expiry times short (minutes to hours) and use refresh tokens for longer sessions. If a token &quot;expires too early&quot;, check that the server clock is right and that exp is in seconds, not milliseconds."],["The three parts of a token","Header: which algorithm (alg) and type (typ), like {&quot;alg&quot;:&quot;HS256&quot;,&quot;typ&quot;:&quot;JWT&quot;}. Payload: the claims. Signature: the header and payload signed with the key. Each part is Base64URL text, which uses - and _ instead of + and / and drops the = padding, so the token can go safely in a web address."],["HS256 or RS256?","HS256 uses one shared secret to sign and to check, so every service that checks tokens must know the secret. RS256 and ES256 sign with a private key and check with a public key, so services can check tokens without being able to make new ones. Big sign-in providers publish their public keys at a JWKS address."]],"faqs":[{"q":"Is it safe to paste my token here?","a":"Yes. The token is decoded on your device and never sent to us or anyone else, unlike some online decoders. Still, a token is like a temporary password: do not share live production tokens in chats or screenshots, and sign out (or revoke the token) if you think one has leaked."},{"q":"Why does it say the token has expired?","a":"The exp claim is earlier than the time on your device. Get a new token by signing in again or using your refresh token. If tokens seem to expire straight away, check the server and device clocks, and make sure exp is set in seconds (10 digits), not milliseconds (13 digits)."},{"q":"Can I see what is inside without the secret?","a":"Yes. The header and payload are only Base64URL encoded, so anyone can read them without a key. The secret or public key is only needed to check the signature, which proves the token was made by the real server and not changed."},{"q":"Which algorithms can it verify?","a":"HS256, HS384 and HS512 with a shared secret; RS256, RS384 and RS512 and PS256, PS384 and PS512 with an RSA public key; and ES256, ES384 and ES512 with an elliptic-curve public key. Encrypted tokens (JWE, with five parts) cannot be read without the private key."},{"q":"Is what I paste sent anywhere?","a":"No. Tokens, secrets and keys are worked on in your browser. Everything runs in your browser on your own phone or computer, and nothing is sent to our servers or saved."},{"q":"Is the JWT Decoder free?","a":"Yes. There is no sign-up, no limit and nothing to install. It also works offline once the page has loaded."}]},"feat":[["Header and claims","Coloured JSON, with each claim explained."],["Expiry countdown","exp, iat and nbf as real dates."],["Verify signatures","HS, RS, PS and ES algorithms."]],"faqx":[{"q":"What is the difference between a JWT and a session cookie?","a":"A session cookie holds a random ID that the server looks up in its database. A JWT carries the user details and expiry inside itself, signed, so the server can check it without a database. JWTs are handy for APIs and mobile apps, but are harder to cancel before they expire."},{"q":"Where is the JWT stored in my browser?","a":"Usually in localStorage, sessionStorage or a cookie set by the site. In Chrome, open developer tools, then Application to see them, or Network to see the Authorization: Bearer header on each request."},{"q":"What does &quot;invalid signature&quot; mean?","a":"The secret or public key you pasted is not the one that signed the token, or the token was changed after it was signed. Check that you used the right key for the right environment (test or live), and that no spaces were added when copying."},{"q":"What are exp and iat?","a":"exp is the expiry time and iat the time the token was issued, both in seconds since 1 January 1970 UTC (Unix time). The tool shows them as dates in your own time and says how long is left. Use our Unix Timestamp Converter for other times."}]}