JWT Debugger & Decoder
Decode and inspect JSON Web Tokens with live expiration checks.
Keys are used only in this browser tab and are never sent anywhere.
{
"alg": "HS256",
"typ": "JWT"
}{
"sub": "1234567890",
"name": "John Doe",
"iat": 1516239022
}| sub | Subject | 1234567890 |
| iat | Issued at | 1/18/2018, 1:30:22 AM (9 years ago) |
About this tool
A JSON Web Token (JWT, RFC 7519) is a compact, signed piece of JSON that a server hands to a client after login. The client sends it back with each request, usually in an Authorization: Bearer header, and the server checks the signature instead of looking up a session. JWTs are used by OAuth 2.0 and OpenID Connect providers, API gateways and most single-page applications.
This debugger decodes the header and payload, translates time claims like exp and iat into readable dates, warns about dangerous header values, and verifies the signature with your secret or public key using the browser's Web Crypto API. Tokens and keys never leave the page, which matters because a valid token is a credential.
How to use JWT Debugger & Decoder
- Paste a token into the Encoded token box. A leading "Bearer " is removed automatically. The three parts are colored: header, payload and signature.
- Read the decoded header (algorithm and key ID) and payload (claims). Registered claims are explained in the table, and time claims show the date, how long ago or until, and whether the token is expired or not yet valid.
- To verify the signature, enter the shared secret for HS256/384/512, or the issuer's public key as PEM (-----BEGIN PUBLIC KEY-----) or JWK for RS, PS and ES algorithms. The result updates as you type.
- Use the Create tab to sign test tokens for development: choose the algorithm, edit the payload, set an expiry with one click, and sign with a secret or a PKCS#8 private key.
Examples
Decode a token
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxw…
Header: {"alg": "HS256", "typ": "JWT"}
Payload: {"sub": "1234567890", "name": "John Doe", "iat": 1516239022}
iat → 18 January 2018, 01:30:22 UTC Verify with the wrong secret
Secret: wrong-secret
Invalid signature: the token was altered or the key is wrong
With the correct secret (your-256-bit-secret for this sample) the result is "Signature verified".
What is inside a JWT
A JWT is three Base64URL-encoded parts joined by dots. The header says how the token is signed (alg) and sometimes which key was used (kid). The payload carries claims: registered ones such as iss (issuer), sub (subject, usually the user ID), aud (audience), exp (expiry), nbf (not before) and iat (issued at), plus any custom data. The signature is computed over the first two parts, so changing even one character of the payload invalidates it.
The payload is only encoded, not encrypted. Anyone holding the token can read it, so never put passwords or personal data in a JWT you would not show the user. Encrypted tokens (JWE) have five parts and cannot be decoded without the key.
Security checklist for JWT verification
- Pin the algorithm on the server. Never accept "alg": "none", and never let the token choose between HMAC and RSA.
- Get verification keys from configuration or the issuer's JWKS endpoint, never from jku, x5u or jwk values inside the token.
- Always check exp, and check nbf, iss and aud against the values your service expects.
- Use long random secrets for HS256 (at least 32 bytes). Short or dictionary secrets can be brute-forced offline from a single token.
- Keep tokens short-lived and use refresh tokens; a stolen JWT is valid until it expires.
Frequently asked questions
Everything you need to know about this tool and data security.
Is it safe to paste a production token here?
The token is decoded and verified entirely in your browser; nothing is sent to a server. Still, treat live tokens like passwords: prefer expired or test tokens when sharing your screen.
Why does verification say "Invalid signature" when the payload looks right?
The key does not match the one used to sign the token, the token was modified, or (for HS algorithms) the secret is Base64-encoded. Tick "Secret is Base64-encoded" if your provider shows the secret that way.
Which key formats are supported?
HMAC secrets as text or Base64; public keys as SPKI PEM (-----BEGIN PUBLIC KEY-----) or JWK JSON. PKCS#1 "RSA PUBLIC KEY" blocks and certificates must be converted to a public key first.
What is the difference between HS256 and RS256?
HS256 uses one shared secret to both sign and verify, so every verifier could also mint tokens. RS256 (and ES256) sign with a private key and verify with a public key, so services can check tokens without being able to create them.
Is my data safe when using this tool?
Yes, 100% safe. This tool operates entirely inside your web browser using client-side JavaScript and WebAssembly. Your data never touches any external server.
Related Tools
Encode text to Base64 or decode Base64 to UTF-8 text with instant live conversion.
Generate SHA-256, MD5 hashes, and convert URL, HTML entities, and Hex.
Prettify, validate, and minify JSON data instantly in your browser.
Featured Projects tech-fun.net
Explore more AI & productivity tools
Nihongo GameBox
Master Japanese typing, Kana, and JLPT N5–N1 vocabulary through interactive retro arcade games.
ResumeGPT
Tailors CVs and cover letters to every job opportunity with a multi-agent LLM pipeline, job tracking, and scheduled discovery.
CollectMind
Turns your bookmarks into a searchable AI knowledge base — entirely on-device, powered by Chrome's built-in Gemini Nano.