devpocket.dev

JWT Generator & Verifier

Create and verify JWTs locally with HMAC, RSA, ECDSA, or RSA-PSS keys.

Runs locally
Loading tool…

How to use

Choose Sign and an algorithm, edit typ, optional kid, and the Claims JSON, then enter an HMAC secret or PKCS#8 private PEM. Helpers add iat, nbf, exp, and a cryptographic UUID jti; the token updates live. Sample creates fresh in-memory key material and realistic claims. In Verify, paste a token plus the matching secret or SPKI public PEM and set allowed clock skew. Verification always enforces your selected algorithm instead of trusting the token header, then reports signature status and exp, nbf, and future iat failures. Base64 mode decodes HMAC secrets before use. Keys and tokens are never persisted.

FAQ

How do I create an HS256 JWT?

Select HS256, enter Claims JSON and a sufficiently random HMAC secret, then copy the token that updates live. Enable the Base64 option when the secret is encoded rather than plain text.

Which PEM key formats does JWT signing use?

RSA, ECDSA, and RSA-PSS signing imports a PKCS#8 private key. Verification imports the corresponding SPKI public key. Encrypted PEM files are not supported by Web Crypto import.

Does JWT verification trust the alg header?

No. The selected algorithm is required to match the header before the key is imported, which prevents switching between HMAC and asymmetric verification paths.

Are JWT keys or tokens stored or uploaded?

No. Secrets, PEM keys, claims, and tokens remain only in memory and all cryptographic operations run locally with the Web Crypto API.

Related tools