JWT Generator & Decoder
100% LocalGenerate, decode and verify JSON Web Tokens safely.
Waiting for valid token...
Zero Trust Policy
This decoder runs entirely in your browser. The token is never sent to our servers.
Paste a JWT or create a new one. Header, payload, and signature decode into separate panels.
Learn More
JWT Security 101: How to Audit Tokens Without Leaking Secrets
JWT Tokens Explained: Decode, Verify & Common Mistakes (2026 Guide)
We Fed 200 Malformed JWTs to 5 Libraries: What Actually Broke
A practical test of JWT validation behavior across major libraries, focusing on algorithm confusion, exp requirements, malformed encoding, and real-world verification failures.
What is JWT Generator & Decoder?
Frequently Asked Questions
Technical Deep Dive
JWT Generator & Decoder
JSON Web Tokens (JWT) are a central part of modern authentication. This tool lets you generate new tokens with custom payloads and secrets, or paste any JWT to see its header, payload, and signature components. All processing happens locally in your browser for maximum security.
Generate and inspect tokens without the jwt.io debugger. Signing happens in this tab; the secret never posts anywhere.
Mint an HS256 token with secret dev-only and claim sub=42. Decode it here: header alg HS256, payload sub 42. Then change one payload character, verify must fail.
Do not use HS256 secrets that exist in production. RS256 verify needs the public key that matches the issuer.
01 Algorithm Selection Matrix
| Family | Algorithm | Type | Key Requirement | Security Level |
|---|---|---|---|---|
| HMAC | HS256/HS512 | Symmetric | Shared Secret | High (Internal) |
| RSA | RS256/RS512 | Asymmetric | Private/Public Pair | Industry Standard |
| ECDSA | ES256/ES512 | Asymmetric | Elliptic Curve Pair | Modern/Compact |
| None | none | None | N/A | โ ๏ธ Insecure |
02 Validation & Signing Pipeline
header.payload).
header.payload.signature).
03 When You Reach for a JWT Tool
JWTs are easy to read once you understand the format, but mistakes are expensive, a leaked or misconfigured token can mean account takeover. Five realistic moments where this tool is the right answer:
-
Debugging "401 Unauthorized" from your own API Paste the token from your client's network panel, check the
expclaim against the current Unix timestamp, verifyaudmatches what your API expects, confirmissmatches your issuer. 80% of "auth is broken" calls resolve to one of these three claims being wrong. -
Verifying signatures against your IdP's JWKS Fetch the public key from
/.well-known/jwks.json, paste the JWK or PEM into the verifier, and confirm the token is genuinely signed by Auth0/Cognito/Okta/Keycloak rather than a forged token from somewhere else. -
Generating test tokens for local development Need a token with specific claims for an integration test? Mint one with HS256 + a known secret, drop it into your test fixture, validate against the same secret in the test setup.
-
Auditing third-party SDK tokens Many vendor SDKs hand you opaque-looking strings that are actually JWTs. Decoding reveals what claims they're sending (and whether they're leaking customer data into a third-party telemetry channel).
-
Teaching the format to a teammate The three-segment
header.payload.signaturestructure clicks faster when someone watches you paste a real token and see each segment decode in front of them than when they read RFC 7519.
04 Worked Examples
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c2VyXzQyIiwiZXhwIjoxNzM1NjA2ODAwLCJpYXQiOjE3MzU2MDMyMDB9.kY8C4dQqYn1uYx2nW0XLk6OWvJ8x1u5Y9q2oZc-W3Yw
{ "alg": "HS256", "typ": "JWT" }
{
"sub": "user_42",
"exp": 1735606800, // expires in 1 hour
"iat": 1735603200
}
Two segments are visible to anyone who has the token. Anything sensitive in the payload, passwords, full names, internal IDs that map to PII, is effectively public.
{ "alg": "none", "typ": "JWT" }
Send header.payload. with an empty signature segment. A vulnerable verifier checks alg, sees "none", and skips signature validation entirely, your forged {"sub": "admin"} payload is accepted as authentic.
On every verifier, pin the allowed algorithm list: verify(token, secret, { algorithms: ['HS256'] }). This tool refuses to verify "none" tokens by default.
"exp": 1735606800
now = Math.floor(Date.now() / 1000)
isExpired = now >= exp
JWT timestamps are seconds, not milliseconds. The single most common JWT bug is comparing exp against Date.now() directly, your tokens appear valid for 1000ร their intended lifetime.
05 Related Tools
JWTs touch a wider auth surface than most developers expect, encoding, key generation, and policy reference all live nearby: