What is a JWT made of?
Three Base64url segments joined by dots: header, payload and signature. The header names the signing algorithm, the payload holds the claims, and the signature proves the first two parts have not been altered since they were signed.
Is a JWT encrypted?
No, and this is the single most important thing to understand. Base64 is encoding, not encryption. Anyone holding the token can decode the payload and read every claim in it. The signature proves the token has not been tampered with; it does not hide anything.
So what should I never put in a JWT?
Anything you would not hand to whoever holds the token: passwords, card numbers, personal data. Put an identifier in the token and keep the sensitive data on your server, where the token is used to look it up.
Which signing algorithm should I choose?
HS256 when the same system both issues and verifies tokens, because it uses one shared secret for both. RS256 or ES256 when other parties need to verify tokens without being able to create them, because those split signing and verification into a private and a public key.
What is the practical difference between HS256 and RS256?
With HS256, anyone who can verify a token can also mint one — it is the same secret. With RS256 you can publish the public key freely and remain the only party able to issue tokens. If a third party has to check your tokens, you want RS256 or ES256.
How long should my HS256 secret be?
Long and genuinely random — treat it like a cryptographic key rather than a password. A short or guessable secret can be brute-forced offline from a single captured token, after which anyone can forge tokens your system will accept.
Is my secret or private key sent anywhere?
No. The token is signed on your device using the browser's own Web Crypto implementation, so the key never leaves the page. A signing key pasted into a remote service should be treated as compromised from that moment.
Can I use tokens made here in production?
Treat them as test tokens. For production, sign on your own infrastructure and keep keys in a secrets manager rather than a browser tab. This tool is for building, inspecting and debugging tokens during development.
Which claims should I always set?
An expiry (exp) above all — a token without one is valid forever, including after it leaks. Beyond that, iat for issued-at, sub for who the token is about, iss for who issued it, and aud so the token cannot be replayed against a different service.
How long should a token last?
As briefly as your flow allows. Short expiries are the most effective protection there is: a leaked token that expires in fifteen minutes is a far smaller problem than one lasting a year. Use refresh tokens for longer sessions.
Can I revoke a JWT?
Not directly, and this is the main trade-off of the format. A signed token stays valid until it expires, because verification does not involve your server. If you need revocation, keep a denylist of token identifiers or use short expiries with refresh tokens.
Why is my token being rejected?
Usually one of four things: it has expired, the verifying side has a different secret or key, the algorithm does not match what the verifier expects, or the audience or issuer claim does not match. Decode the payload first — the reason is normally visible in the claims.
What is the difference between this and a JWT decoder?
This tool builds and signs a new token from claims you provide. A decoder takes an existing token apart so you can read its header and payload and check its signature. Both are linked from the site.
Is this tool free?
Yes, with no sign-up and no limit. Everything runs in your browser.