JWT decoder and signer
Decode, inspect, verify, build, and sign JSON Web Tokens — HS, RS, PS, ES, and EdDSA — and generate test key pairs, all with WebCrypto.
Added
How to use it
Decode & verify — paste a token (a leading Bearer is ignored). The header, payload, and
signature are coloured, the JSON is pretty-printed, and every claim is explained, with
exp, nbf, iat, and auth_time shown as dates and as “in 3 hours” / “2 days ago”.
Problems are flagged: alg: none, expired or not-yet-valid tokens, missing exp, very long
lifetimes, crit headers, and jku/x5u key URLs.
To verify, enter the shared secret for HS256/384/512 (as text, Base64, or hex), or a public
key for RS, PS, ES, or EdDSA tokens as a PEM (BEGIN PUBLIC KEY), a JWK, or a whole JWKS —
the key whose kid matches the token is used.
Build & sign — choose the algorithm, edit the header and payload JSON, add iat, nbf,
exp, or jti with one click, and sign with a secret or a private key (PEM BEGIN PRIVATE
KEY or JWK). Open in decoder checks the result.
Keys — generate RSA (2048–4096 bits), EC (P-256, P-384, P-521), Ed25519, or HMAC test keys,
exported as PEM and JWK with an RFC 7638 thumbprint as the kid. Use them for testing only.
Tokens and keys stay in the page; the token is kept in browser storage only if you tick
remember. PKCS#1 (BEGIN RSA PRIVATE KEY) and SEC1 (BEGIN EC PRIVATE KEY) PEMs are not
supported by WebCrypto — convert them with openssl pkcs8 -topk8 -nocrypt.
Sharing
Share link copies a URL that opens this tool exactly as you have it. Hand-written links work too: A JWT is usually a live credential, so Share link on the decoder sends the token without its signature (header.payload.) — enough to read the claims, useless for logging in; only the public demo token travels whole. The builder shares ?alg=…&kid=…&payload=… without the key; Keys shares ?keyAlg=RS256&bits=4096. For example ?alg=HS256&payload=%7B%22sub%22%3A%2242%22%7D#build.
Feedback is a gift. Something to improve, a feature to add, or a bug? Tell me.
Runs entirely in your browser; nothing you type leaves this page.