JWT Decoder
Decode JSON Web Tokens (JWT) to inspect the header, payload, and signature. Runs entirely in your browser — tokens are never sent to any server.
Last updated:
CommentsPaste a JWT above to instantly decode the header and payload. Everything runs in your browser — the token is never sent anywhere.
Security note: this tool only decodes the token — it does not verify the signature. To check whether the signature is valid, use the JWT Verifier. Never paste production tokens into any online tool you don’t fully trust.
What is JWT Decoder?
A JSON Web Token (JWT, RFC 7519) is a compact, URL-safe way to transmit claims between two parties. It has three Base64URL-encoded parts joined by dots: `header.payload.signature`. The header names the algorithm, the payload carries the claims, and the signature protects integrity. Decoding is trivial and public; verification requires the signing key.
How to decode a JWT
- 1Copy the JWT — it looks like `eyJhbGciOi....eyJzdWIiOi....signature`.
- 2Paste it into the input area on this page.
- 3The header (algorithm, type) and payload (claims like `sub`, `exp`, `iat`, `iss`) are decoded and shown as JSON.
- 4Check `exp` (expiration) against the current time to see if the token is still valid.
- 5Signature verification requires the secret/key — this tool does not perform it (nor should any online tool you don't fully trust).
Use Cases
Debug 401 responses
When an API returns 401, decode the caller's token here to check for expired `exp`, wrong `aud`, or missing scopes.
Inspect OAuth / OIDC ID tokens
Providers like Auth0, Cognito, and Firebase issue JWTs. Decode them to see user identity, groups, and email verification status.
Verify claim shape
Confirm that your token issuer is including the fields your backend expects — no more guesswork.
Educational / interview prep
Understand what's actually inside a JWT to answer 'how does JWT work' with concrete examples.
Code Examples
Decode a JWT in Node.js (jsonwebtoken)
import jwt from "jsonwebtoken";
// Decode without verifying
const decoded = jwt.decode(token, { complete: true });
// Verify with secret
const verified = jwt.verify(token, secret);Decode a JWT in Python (PyJWT)
import jwt
# Decode without verifying
data = jwt.decode(token, options={"verify_signature": False})
# Verify with secret
data = jwt.decode(token, key=secret, algorithms=["HS256"])Decode a JWT in Go
import "github.com/golang-jwt/jwt/v5"
token, _, err := jwt.NewParser().ParseUnverified(raw, jwt.MapClaims{})Decode a JWT with jq
# Split on '.', base64 -d the payload, pretty-print
echo $TOKEN | cut -d '.' -f2 | base64 -d 2>/dev/null | jq .Key Concepts
- Header
- The first segment. Declares the signing algorithm (`alg`) and token type (`typ`). Base64URL-encoded JSON.
- Payload / Claims
- The second segment. Standard claims: `iss` (issuer), `sub` (subject), `aud` (audience), `exp` (expires at, seconds since epoch), `nbf` (not before), `iat` (issued at), `jti` (unique id).
- Signature
- The third segment. HMAC (HS256/384/512) or RSA/ECDSA (RS256/ES256) over `base64url(header) + '.' + base64url(payload)`.
- alg: none attack
- Some libraries once accepted `alg: none` (unsigned) tokens. Modern libraries reject this — always specify allowed algorithms explicitly when verifying.
Tips & Best Practices
- ▸Never trust the payload without verifying the signature — the payload is just Base64, anyone can forge it.
- ▸For sensitive data, remember: JWT is signed, not encrypted. Payload is public. Use JWE if you need encryption.
- ▸Keep tokens short-lived (`exp` 15 min – 1 hour) and pair with a refresh token. Long-lived JWTs are a common security issue.
- ▸Always specify allowed algorithms in verification code — never pass `algorithms=[]` or accept whatever the token header says.
Frequently Asked Questions
Is my JWT sent to any server?
No. All decoding happens locally in your browser using JavaScript. Never paste production tokens into any online tool you do not fully trust — including this one — without understanding the code that runs.
Can I decode a JWT without the secret?
Yes. A JWT's header and payload are Base64URL-encoded, not encrypted, so they can always be read without any key. The secret is only needed to verify the signature — not to decode and inspect the claims.
Does this tool verify the signature?
No. Signature verification requires the signing key/secret. This decoder shows the header and payload for inspection only. Use our JWT Verifier if you need to check an HS256/RS256/ES256 signature.
What are the three parts of a JWT?
A JWT has three Base64URL-encoded parts joined by dots: header (algorithm such as HS256, RS256, or ES256, and token type), payload (claims like sub, exp, iat), and signature (used to verify integrity).
Try Next
AES Encrypt / Decrypt
Encrypt and decrypt text with AES (128 / 192 / 256, GCM authenticated or CBC legacy) using a password. PBKDF2 key derivation with 200,000 iterations. 100% local — the Web Crypto API runs entirely in your browser.
Related Tools
HMAC Generator
Compute HMAC signatures with SHA-1, SHA-256, SHA-384, or SHA-512 online. Verify API requests, sign webhooks, and authenticate messages. Free, no signup — signing runs locally via the Web Crypto API, secrets never leave your browser.
Hash Generator
Generate MD5, SHA-1, SHA-256, and SHA-512 hashes of any text online. Free, no signup — all hashing runs entirely in your browser via the Web Crypto API, so nothing is uploaded.
JWT Generator
Create signed JSON Web Tokens with HS256/384/512 (HMAC), RS256/384/512 (RSA), PS256/384/512 (RSA-PSS), or ES256/384/512 (ECDSA). Paste a raw secret, a PEM private key, or a JWK — signing runs entirely in your browser via the Web Crypto API.
HMAC-SHA256
Compute HMAC-SHA256 signatures with any secret key. Outputs hex, base64, and base64url encodings. Verify a signature against an expected value in one click. Used by AWS SigV4, JWT HS256, Stripe / GitHub / Slack webhooks. 100% local via Web Crypto API.
Bcrypt Generator
Generate and verify bcrypt password hashes online. Configurable cost factor (4–15), shows computation time so you can pick a cost matching your server hardware. Parses and displays hash version and cost from any pasted hash. 100% local — passwords never leave your browser.
HMAC-SHA1
Compute HMAC-SHA1 signatures with any secret key. Outputs hex, base64, and base64url. Still used by OAuth 1.0, AWS S3 signature v2, and some older webhook schemes. 100% local via Web Crypto API.