PK Systems PK Systems
Encoders & decoders

JWT Signer & Verifier

Sign and verify JSON Web Tokens client-side with HS256/HS384/HS512, RS256 and ES256. Generate RSA & ECDSA keys in-browser.

JWT Signer & Verifier

HS* uses a shared secret; RS256 and ES256 use an asymmetric keypair.

The alg field auto-syncs with the selector above.

Standard claims: sub, iss, aud, iat, exp, nbf, jti.

For production, use 256+ bits of random entropy. Don’t reuse passwords.

Signed JWT


            
        

What is a JWT?

A JSON Web Token (JWT) is a compact, URL-safe way to transport claims between two parties. It consists of three Base64URL-encoded parts joined by dots: a header that names the algorithm, a payload of arbitrary JSON claims, and a signature computed over header.payload with a key. The receiver re-computes the signature and rejects the token if it does not match. JWTs are popular for stateless authentication because servers do not need to remember sessions — every request carries its own proof. The flip side is that you cannot revoke a token once issued without an extra revocation list, and any leaked secret or key compromises every token signed with it. This tool runs entirely on your device — your secrets, signing keys, and tokens never leave the page, never travel to our servers, and are not stored, indexed, logged, or shared. That privacy guarantee matters because a single keystroke leak of a JWT signing secret can compromise every user account it issues tokens for.

How to use the signer/verifier

Pick the algorithm that matches your environment, paste the header and payload (or use the defaults as a template), then click Sign. For RS256 and ES256 you can generate a fresh keypair on the page; for HS256 you supply a shared secret. To verify, switch to verify mode, paste the token and the matching secret or public key, then click Verify. The decoded payload appears in the verdict box on success.

Practical tips and gotchas

Always set exp (expiry) on production tokens. Never accept the algorithm advertised in the header without an allow-list — the classic alg=none attack exploits servers that trust the header. Rotate signing keys periodically, store private keys in a HSM or secrets manager, and treat HMAC secrets like passwords. For browsers and mobile apps, prefer short-lived JWTs paired with refresh tokens stored in HttpOnly cookies.

Supported algorithms

Alg Family Use case
HS256HMAC + SHA-256Internal services that share a single secret. Fast, simple.
HS384HMAC + SHA-384Internal services that share a single secret. Fast, simple.
HS512HMAC + SHA-512Internal services that share a single secret. Fast, simple.
RS256RSA + SHA-256Public APIs distributing the public key for verification.
ES256ECDSA P-256 + SHA-256Like RS256 but with shorter signatures and modern elliptic curves.

Frequently asked questions

Is anything sent to your server?
No. The signing and verification happen entirely on your device using your browser's built-in cryptography. Your secrets, keys, and tokens never leave the page, never travel to our servers, and are not stored, indexed, logged, or shared.
What’s the difference between HS256 and RS256?
HS256 uses a single shared secret for both signing and verification — anyone who can verify can also sign. RS256 uses an RSA keypair: the private key signs, the public key verifies, so the verifier doesn’t need the signing material.
Can I use this for production keys?
You can generate development keys here, but production private keys should live in your KMS or HSM. Pasting a real production key into any web page is a meaningful security event.
Why does my token fail to verify?
Common causes: wrong algorithm in the dropdown vs the token header, mismatched secret/public key, expired (exp) or not-yet-valid (nbf) token, tampered payload, or a copy-paste that introduced whitespace.
What encoding does the payload use?
JWT serialises the JSON payload to UTF-8, then Base64URL-encodes it. JSON keys are case-sensitive. Strings inside the payload should be UTF-8.
Are JWTs encrypted?
Standard JWTs are signed but not encrypted — anyone can decode the payload. Use JWE if you need confidentiality, or carry sensitive data outside the token.