JWT Decoder & Encoder
Paste a JSON Web Token to read its header and payload, see when it expires and verify its signature. Or build and sign a new token. Everything happens in your browser.
Paste a token above to decode it, or click Sample token to try one.
Header
Algorithm and token typePayload
Claims (the token’s data)Claims
| Claim | Value | What it means |
|---|
Verify signature
Creates a fresh test key pair in your browser.
Signs the token. It never leaves this page.
Share this so others can verify your tokens.
Signed token
Runs entirely in your browser. Tokens, secrets and keys are never uploaded or saved, not even in your browser’s storage. Even so, avoid pasting production secrets or live tokens on a shared or public computer.
Free Online JWT Decoder and Encoder
This free JWT decoder shows you what’s inside any JSON Web Token in seconds. Paste a token to see its header and payload as readable JSON, get every claim explained, check when the token expires and verify its signature with your secret or public key. Switch to Encode to build and sign a new token. It all runs in your browser, so your tokens, secrets and keys are never uploaded.
What is a JWT?
A JSON Web Token (JWT, often pronounced “jot”) is a compact way to pass signed information between two systems. Sign-in services issue JWTs as ID tokens and access tokens, and APIs read them to find out who is calling and what they’re allowed to do.
A JWT is three pieces of Base64URL text joined by dots: header.payload.signature. The decoder colors each part so you can tell them apart.
- Header: names the signing algorithm (alg) and usually the token type (typ). It may include a key ID (kid) that says which key signed the token.
- Payload: the claims, meaning the actual data, such as the user ID, name, roles and expiry time.
- Signature: made from the header and payload with a secret or a private key. Change a single character and the signature no longer matches.
The header and payload are only encoded, not encrypted. Anyone who has the token can read them.
How to decode and verify a JWT
- Paste your token. Open the Decode tab and paste the JWT into the Encoded token box, or click Paste. A leading “Bearer ” is removed for you. Click Sample token to try a working example.
- Read the header and payload. Both appear as color-coded JSON, each with a Copy button.
- Check the claims. The Claims table explains every claim. Times such as exp, iat and nbf are shown as a local date, in UTC and as relative time, for example “Expires in 54 minutes”. A badge shows whether the token is Valid, Expired or Not yet valid.
- Verify the signature. For HS256, HS384 and HS512, type the shared secret into Secret, and tick Secret is Base64 encoded if your secret is stored that way. For RS, PS, ES and EdDSA tokens, paste the public key into Public key (PEM or JWK). A PEM key, an X.509 certificate, a JWK or a whole JWKS key set all work. With a key set, the tool picks the key whose kid matches the token.
- Read the result. Signature verified means the token was signed with that secret or key and hasn’t been changed. Invalid signature means it was tampered with or signed with a different key. You also get a hint when the key type doesn’t match the algorithm.
If a token is broken, the decoder tells you why: a missing part, invalid Base64URL or JSON, an encrypted JWE token or an unsigned alg “none” token.
How to create a JWT
- Open the Encode tab and choose an Algorithm: HS256, HS384 or HS512 with a shared secret, or RS, PS or ES with a key pair.
- For HMAC, enter a Secret. Use a long, random value, at least 32 characters. For key pairs, paste a key into Private key (PKCS#8 PEM) or click Generate key pair to create a test key pair in your browser. The matching Public key (PEM) appears next to it.
- Edit the Header and Payload JSON. Errors show the line and column. Use Set iat to now, exp +1 hour and exp +1 day to fill in the time claims.
- The token is signed as you type. Click Copy token, or Decode this token to open it in the decoder with the secret or public key already filled in.
Standard JWT claims explained
These registered claims come from the JWT standard (RFC 7519). The decoder also explains common extras such as name, email, scope and roles.
- iss (Issuer): who created and signed the token, usually the sign-in server’s URL.
- sub (Subject): who the token is about, usually a user ID.
- aud (Audience): who the token is meant for. An API should reject tokens meant for someone else.
- exp (Expiration time): the token must not be accepted after this time.
- nbf (Not before): the token must not be accepted before this time.
- iat (Issued at): when the token was created.
- jti (JWT ID): a unique ID that helps a server spot a token used twice.
JWT times are counted in seconds since January 1, 1970 (UTC). If a time looks like milliseconds, the decoder warns you, since that common bug makes a token look valid for thousands of years.
JWT signing algorithms: HS vs. RS vs. PS vs. ES
- HS256, HS384, HS512 (HMAC): one shared secret signs and verifies. Simple and fast, but every service that checks tokens must hold the secret, and anyone with it can create tokens.
- RS256, RS384, RS512 (RSA): a private key signs and a public key verifies, so services can check tokens without being able to create them.
- PS256, PS384, PS512 (RSA-PSS): the same RSA keys with a more modern padding scheme.
- ES256, ES384, ES512 (ECDSA): elliptic-curve keys with much shorter keys and signatures than RSA.
- EdDSA (Ed25519): a fast, modern curve. The tool verifies EdDSA tokens in browsers that support it.
The number is the size of the SHA-2 hash used. For more on hashing, try our MD5 Hash Generator.
JWT security tips
- The payload isn’t secret. Anyone with the token can read it, so never put passwords or other sensitive data in a JWT.
- Always verify signatures on your server. Decoding a token doesn’t prove it’s genuine.
- Never accept alg “none”, and have your server allow only the algorithms it expects.
- Check exp, nbf, iss and aud on every request, and keep access tokens short-lived.
- Use a long, random secret, at least 32 bytes for HS256, and keep private keys out of source code.
- Keep tokens out of URLs. JWTs only use URL-safe characters, but URLs end up in server logs and browser history, so send tokens in the Authorization header instead.
- Need to inspect a single part by hand? Our Base64 Encoder & Decoder decodes URL-safe Base64 too.
Is it private?
Yes. Everything runs in your browser using the built-in Web Crypto API. Your tokens, secrets and keys are never sent to our server or saved in your browser’s storage. Only interface choices, such as the open tab, are remembered.
Frequently asked questions
Is this JWT decoder free?
Yes. It’s completely free with no sign-up and no limits on how many tokens you decode, verify or create.
Is it safe to paste my JWT here?
Your token is never uploaded or stored. It’s still a credential, though, so avoid pasting live production tokens or secrets on a shared computer.
Can a JWT be decoded without the secret?
Yes. The header and payload are only Base64URL-encoded, so anyone can read them. The secret or public key is only needed to verify the signature.
How do I verify a JWT signature?
Paste the token in the Decode tab. For HS256, HS384 or HS512, enter the shared secret. For RS, PS, ES or EdDSA tokens, paste the public key as a PEM, an X.509 certificate or a JWK. The tool then shows Signature verified or Invalid signature.
Which algorithms are supported?
You can verify HS256, HS384, HS512, RS256, RS384, RS512, PS256, PS384, PS512, ES256, ES384 and ES512, plus EdDSA (Ed25519) in browsers that support it. You can create tokens with all of them except EdDSA.
Why does it say Invalid signature?
The token was changed after signing, or you’re using the wrong secret or key. If your HMAC secret is stored in Base64, tick Secret is Base64 encoded. For key pairs, make sure the public key matches the private key that signed the token.
What’s the difference between HS256 and RS256?
HS256 uses one shared secret to sign and verify. RS256 uses a key pair: a private key signs and a public key verifies, so services can check tokens without being able to create them.
How do I check if a JWT has expired?
Paste it into the decoder. The exp claim is shown as a date and as relative time, such as “Expired 3 days ago”, and a badge shows whether the token is Valid, Expired or Not yet valid.
Can I decode an encrypted JWT (JWE)?
No. A JWE has five parts and an encrypted payload, so it can’t be read without the decryption key. The tool recognizes JWE tokens and tells you so.
