Client-side RS256 JWT signer/decoder/verifier (no network calls). For signing, use a PKCS8 private key PEM (BEGIN PRIVATE KEY).
Header JSON
Payload JSON
RSA Private Key (PKCS8 PEM) — for Generate
Accepted: -----BEGIN PRIVATE KEY----- (PKCS8). Not supported: BEGIN RSA PRIVATE KEY (PKCS1) without conversion.
RSA Public Key (SPKI PEM) — for Verify (optional)
Accepted: -----BEGIN PUBLIC KEY----- (SPKI).
Generated Token (read-only)
Token (for Decode / Verify)
Decoded / Results
How to use
Use this tool to create and validate RS256 JWTs.
- Paste Header JSON and Payload JSON.
- Paste your RSA Private Key (PKCS8 PEM) and click Generate RS256 JWT.
- To inspect a token, paste it into Token (for Decode/Verify) and click Decode.
- To validate a token, paste an RSA Public Key (SPKI PEM) and click Verify.
Note: This tool imports -----BEGIN PRIVATE KEY----- (PKCS8) for signing and -----BEGIN PUBLIC KEY----- (SPKI) for verification.
FAQ
What key formats does this RS256 JWT generator support?
Signing supports RSA PKCS8 PEM (BEGIN PRIVATE KEY), and verification supports RSA SPKI PEM (BEGIN PUBLIC KEY).
Why does it say “PKCS1 key detected (BEGIN RSA PRIVATE KEY)”?
WebCrypto imports PKCS8 for private keys here. Convert PKCS1 to PKCS8 (e.g., with OpenSSL) and paste the BEGIN PRIVATE KEY output.
Does this tool upload my keys or tokens?
No. It runs locally in your browser and does not make network requests.
What does the “kid” field do?
kid is a header hint used to select the right public key during verification/rotation; it doesn’t change how RS256 signing works.
What do iat and exp mean, and should I add them?
iat is “issued at” and exp is “expires at” (both in seconds since epoch). Add them if your server expects time-based validation.
Why is verification failing with “INVALID signature”?
Common causes are mismatched keys, changed header/payload after signing, or using the wrong public key format (must be SPKI BEGIN PUBLIC KEY).
Is the header alg forced to RS256?
Yes. The tool sets alg to RS256 to prevent accidental algorithm mismatch between the UI and the signature.