Paste a token on the left to see its header, claims and expiry.
About this tool
A free, private JWT decoder, debugger and encoder for JSON Web Tokens. Paste a token to see its header and payload as formatted JSON, with every standard claim explained and exp, iat and nbf converted to UTC and local dates with a live countdown. Verify the signature with a shared secret (HS256, HS384, HS512) or a public key in PEM, X.509 certificate, JWK or JWKS form (RS256, PS256, ES256, EdDSA and more), or fetch your identity provider's keys with one click. Paste a whole log, HAR file or Authorization header and every token inside is found for you. Check issuer, audience and allowed algorithms, review security warnings such as alg none, a missing expiry or a guessable HMAC secret, and copy verification code for Node.js, Java, Spring Boot, Python and Go. Switch to Encode to build and sign a new token, Compare to diff two tokens, or Keys to convert keys between PEM and JWK and build a JWKS. Everything runs in your browser with Web Crypto; tokens and keys are never uploaded or saved.
Features
Instant JWT decoding
Header and payload decode as you type, colour-coded to match the token's three segments. Errors name the broken segment and the exact invalid character.
Signature verification
Verify HS256/384/512 with a UTF-8, Base64 or hex secret, and RS, PS, ES and EdDSA algorithms with a PEM public key, X.509 certificate, JWK or a JWKS matched by kid.
Expiry and time checks
exp, nbf and iat are shown in UTC and local time with a live countdown and lifetime bar. Test any reference time and add a clock-skew allowance.
Claims explained
Every registered JWT claim, OpenID Connect claim and common vendor claim from Auth0, Entra ID, Keycloak and Cognito is labelled with a plain-English description.
Claim validation
Enter the issuer, audience, subject and algorithm allowlist your API expects. Audience matching handles both string and array forms.
Security review
Flags alg none, empty signatures, missing or millisecond expiry, very long lifetimes, remote jku/x5u keys, suspicious kid values and secrets in the payload.
JWT encoder and signer
Edit header and payload JSON, add iat, exp, nbf, jti, iss and aud with one click, and sign with any supported algorithm. The token updates live.
Key and secret generator
Generate a random HMAC secret or an RSA, ECDSA or Ed25519 key pair in the browser, with the public key as PEM and as a JWKS ready to publish.
Compare two tokens
Diff the headers and claims of two JWTs side by side, with changed, added and removed claims highlighted and timestamps shown as dates.
Verification code snippets
Copy verification code that uses the token's algorithm, issuer and audience for Node.js (jose), Java (JJWT), Spring Boot, Python (PyJWT) and Go.
Forgiving input
Paste a raw token, a Bearer header, a full Authorization header or a URL with access_token= or id_token=. Encrypted JWE tokens are detected and their header is shown.
Find tokens in logs and HAR files
Paste or open a HAR export, log file or block of headers. Every JWT inside is listed once with its algorithm, subject, issuer, expiry and number of occurrences, so you can step through them.
Load keys from your identity provider
Fetch a JWKS from the issuer's OpenID configuration or any jwks_uri with one click. Only your explicit request goes out; the token is never sent and URLs inside the token are never followed.
Weak secret check
Test an HS256, HS384 or HS512 token against well-known weak secrets from tutorials and framework defaults, plus your own candidates, to catch forgeable tokens before attackers do.
Key converter and JWKS builder
Convert PEM, PKCS#1, X.509 certificates and JWKs in either direction, see the key type, size and RFC 7638 thumbprint, and get a JWKS ready to publish.
Edit and re-sign
Open any decoded token in the encoder with one click to change a claim, extend the expiry or switch algorithms, then sign it again with your test key.
Private by design
Decoding, verifying and signing use your browser's Web Crypto API. Tokens and keys are never uploaded, logged or saved, and key URLs inside tokens are never fetched.
What is a JSON Web Token?
A JSON Web Token (JWT, pronounced “jot”) is a compact, URL-safe way to pass a set of claims between two parties, defined in RFC 7519. APIs use JWTs as OAuth 2.0 access tokens, OpenID Connect uses them as ID tokens, and many apps use them as session tokens sent in the Authorization: Bearer header.
A signed JWT has three base64url-encoded parts separated by dots: a header that names the signing algorithm, a payload that holds the claims, and a signature computed over the first two parts. The decoder colours each part so you can see where one ends and the next begins.
Header eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9
→ {"alg":"HS256","typ":"JWT"}
Payload eyJzdWIiOiI0MiIsImV4cCI6MTc5MzQ5MTIwMH0
→ {"sub":"42","exp":1793491200}
Signature k3Vx…
→ HMAC-SHA256(header + "." + payload, secret)
Token = header.payload.signatureDecoding a JWT is not the same as verifying it
The header and payload are only base64url-encoded, not encrypted, so anyone who holds a token can read its claims. That is why decoding needs no key, and why you should never put passwords, API keys or other secrets in a JWT payload.
Trust comes from the signature. Your server must verify it with a key it already trusts, enforce an explicit list of allowed algorithms, and check exp, nbf, iss and aud before acting on the claims. This tool shows decoding, time checks, claim checks and signature status separately, and the signature stays “not verified” until you supply a key that checks out.
How to verify a JWT signature
For HS256, HS384 and HS512, enter the shared secret exactly as your server uses it. If the secret is stored as Base64 or hex, choose that encoding so the raw bytes match; a common cause of “invalid signature” is a Base64 secret entered as plain text.
For RS256, PS256, ES256, EdDSA and the other asymmetric algorithms, paste the issuer's public key. The tool accepts a PEM public key (BEGIN PUBLIC KEY or BEGIN RSA PUBLIC KEY), an X.509 certificate, a single JWK, or a whole JWKS document; with a JWKS it picks the key whose kid matches the token header. Identity providers publish their JWKS at the jwks_uri listed in /.well-known/openid-configuration.
- Invalid signature: wrong key, wrong secret encoding, or a modified token
- Key error: the key type does not match the algorithm, for example an RSA key for ES256
- alg none: unsigned token that servers must reject
Standard JWT claims explained
RFC 7519 registers seven claims: iss (issuer), sub (subject), aud (audience), exp (expiration time), nbf (not before), iat (issued at) and jti (JWT ID). Times are NumericDate values, meaning whole seconds since 1970-01-01 UTC, not milliseconds. A value with 13 digits is a common bug that this tool flags.
OpenID Connect ID tokens add identity claims such as name, email, email_verified, nonce, auth_time and azp, while OAuth access tokens often carry scope or scp, client_id, roles and groups. Switch the decoded view to Claims explained to see a description next to each one.
Why is my JWT expired or not yet valid?
A token is rejected after its exp time and before its nbf time. If a fresh token is reported as not yet valid, or expires sooner than expected, the clocks of the issuer and your server may differ. Most libraries allow a small clock-skew leeway, typically 30 to 60 seconds; set the same allowance here to reproduce your server's decision.
Use Custom time to check whether a token was valid at the moment a request failed, for example when reading a timestamp from a log line.
JWKS, PEM and key IDs explained
Identity providers publish their public signing keys as a JSON Web Key Set (JWKS) at the jwks_uri listed in /.well-known/openid-configuration. Each key has a kid, and each token names the kid that signed it, so keys can be rotated without breaking existing tokens.
The same key can be written as a PEM block (BEGIN PUBLIC KEY) for OpenSSL and most libraries, or as a JWK for JOSE tooling. Keys & JWKS converts between them and computes the RFC 7638 thumbprint, a stable kid derived from the key itself.
{
"keys": [{
"kty": "EC", "crv": "P-256",
"x": "f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU",
"y": "x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0",
"kid": "oKIywvGUpTVTyxMQ3bwIIeQUudfr_CkLMjCE19ECD-U",
"alg": "ES256", "use": "sig"
}]
}Weak HMAC secrets make JWTs forgeable
With HS256, the signature is only as strong as the secret. Values copied from tutorials, such as secret, your-256-bit-secret or changeme, can be guessed offline in seconds from a single captured token, after which an attacker can sign any claims they like.
Generate secrets with a cryptographic random generator (at least 32 bytes for HS256, 64 for HS512), store them in a secret manager, and rotate them if they ever appeared in source code. The weak secret check helps you find tokens that are already at risk.
Create and sign a JWT for testing
Choose Encode & sign, pick an algorithm and edit the header and payload JSON. The quick buttons add iat, exp, nbf, jti, iss and aud with correct NumericDate values. For HMAC algorithms the tool fills in a random secret of the recommended length; for RSA, ECDSA and EdDSA select Generate key pair to create keys in your browser and copy the public key as PEM or JWKS for your test server.
Select Decode & verify on the result to open the new token in the decoder with its verification key already filled in. Use generated keys for development only, and never paste production signing keys into any website.
How to use it
- Paste a JWT into the Encoded token box. “Bearer” and “Authorization:” prefixes, quotes and line breaks are removed automatically, and the header, payload and signature are colour-coded.
- Read the decoded header and payload as JSON or switch to Claims explained. The status bar shows whether the token is expired; enter the secret or public key under Verify signature to check it.
- Optionally set expected issuer, audience and algorithms, adjust the reference time or clock skew, review the security findings, then copy the payload or a verification snippet for your language.
Common uses
- Debug 401 Unauthorized errors by checking a token's expiry, audience, issuer and signature
- Inspect OAuth 2.0 access tokens and OpenID Connect ID tokens from Auth0, Okta, Keycloak, Cognito or Microsoft Entra ID
- Create signed test tokens with custom claims for local development and integration tests
Common questions
Is it safe to paste my JWT here?
Decoding, verification and signing happen entirely in your browser with JavaScript and the Web Crypto API. Tokens and keys are not uploaded, logged, put in the URL or saved to storage. Even so, treat live production tokens as passwords and prefer expired or test tokens when you can.
Can this tool verify a JWT signature?
Yes. Enter the shared secret for HS256, HS384 or HS512, or the public key for RS256, RS384, RS512, PS256, PS384, PS512, ES256, ES384, ES512 or EdDSA (Ed25519). PEM keys, X.509 certificates, JWKs and JWKS documents are supported.
Why does it say “Invalid signature”?
The key does not match the one that signed the token, or the token was changed after signing. For HMAC tokens, check whether your secret is stored as Base64 or hex and choose that encoding. For JWKS, make sure the set contains the key with the token's kid.
Can I decode a JWT without the secret?
Yes. The header and payload are only base64url-encoded, so they can be read without any key. The secret or public key is needed only to verify that the token is authentic.
How do I check if a JWT is expired?
Paste the token. The status bar shows Expired or Not expired with the exact time remaining, based on the exp claim. You can add a clock-skew allowance or check validity at a custom date and time.
What do exp, iat and nbf mean?
exp is the expiration time, iat is when the token was issued, and nbf is the time before which it must not be accepted. All three are NumericDate values in seconds since the Unix epoch, shown here in UTC and in your local time.
Can I create or encode a JWT?
Yes. Choose Encode & sign, edit the header and payload JSON, choose an algorithm and enter a secret or private key. You can also generate a secret or key pair. The signed token updates as you type.
Does it support JWE encrypted tokens?
Encrypted tokens with five segments are recognised and their protected header is shown, but the payload cannot be read without decrypting it with the recipient's private key, which this tool does not do.
Will it fetch keys from the jku or JWKS URL?
No. Keys referenced by a token are never fetched automatically, because trusting a URL chosen by the token is a known attack. Download your issuer's JWKS yourself and paste it into the key box.
Which private key formats can I sign with?
PKCS#8 PEM (BEGIN PRIVATE KEY), PKCS#1 RSA PEM (BEGIN RSA PRIVATE KEY) and private JWKs. Convert SEC1 EC keys with openssl pkcs8 -topk8 -nocrypt -in key.pem. Encrypted private keys are not supported.
How do I find JWTs in a HAR file or log?
Paste the text into the token box or select the open-file button and choose a .har, .log or .txt file up to 5 MB. Every distinct token is listed with its subject, issuer, algorithm and expiry, and you can step through them one by one. Nothing is uploaded.
Can it load my identity provider's public keys?
Yes. For RS, PS, ES and EdDSA tokens, open Load public keys from the issuer. The URL is prefilled from the token's iss claim; select Fetch keys and your browser downloads the JWKS directly. If the provider blocks cross-origin requests, open the URL in a new tab and paste the JSON instead.
How do I check if my JWT secret is weak?
Decode an HS256, HS384 or HS512 token and select Check secret strength in the Security review. The tool tries well-known weak secrets locally, plus any candidates you add. A match means anyone can forge your tokens. No match does not prove the secret is strong; use at least 32 random bytes.
How do I convert a PEM key to a JWK or JWKS?
Choose Keys & JWKS and paste the PEM public key, private key or certificate. The tool shows the public key as PEM, JWK and JWKS, with the RFC 7638 thumbprint as kid, and converts private keys too. Paste a JWK to get PEM instead.
What is the difference between HS256 and RS256?
HS256 uses one shared secret to both sign and verify, so every verifier can also create tokens. RS256 signs with a private key and verifies with a public key, so services can check tokens without being able to mint them. ES256 and EdDSA work like RS256 with smaller keys and signatures.
Can’t find the tool you need?
Tell us what you’d like it to do. We’ll review your suggestion for a future tool.