Skip to main content

JWT RS256 / ECDSA Decoder

Decode and verify JWT tokens signed with asymmetric algorithms — RS256, RS384, RS512, ES256, ES384, ES512, PS256, PS384, PS512. Inspect all claims with human-readable timestamps. Paste your PEM public key to cryptographically verify the signature using the Web Crypto API. All processing runs locally in your browser.

✓ RS256, ES256, PS256 + all variants ✓ Verify signature with PEM public key ✓ Standard claims with readable timestamps ✓ 100% in-browser, no data sent anywhere

Frequently Asked Questions

What is the difference between RS256 and HS256?▼

HS256 (HMAC-SHA256) uses a single shared secret key for both signing and verifying tokens — anyone who can verify a token can also create one. RS256 (RSA-SHA256) uses a public/private key pair: the server signs with its private key, and any consumer can verify with the public key without being able to forge tokens. RS256 is preferred for distributed systems, third-party integrations, and zero-trust architectures where you cannot share a secret.

What is ECDSA and why use ES256 instead of RS256?▼

ECDSA (Elliptic Curve Digital Signature Algorithm) uses elliptic curve cryptography instead of RSA. ES256 (ECDSA with P-256 and SHA-256) produces signatures roughly 7x smaller than RS256 (64 bytes vs ~256 bytes) while offering equivalent security with much shorter keys (256-bit vs 2048-bit). ES256 is faster to sign and verify, making it ideal for mobile apps, IoT devices, and high-throughput APIs. The tradeoff is slightly more complex key management.

How do I get my public key in the right PEM format for verification?▼

You need the key in SPKI (SubjectPublicKeyInfo) PEM format. For RSA: export from your key pair with 'openssl rsa -in private.pem -pubout -out public.pem'. For EC keys: 'openssl ec -in private.pem -pubout -out public.pem'. If you have a JWK (JSON Web Key) from a JWKS endpoint, convert it using a library like 'jose' (Node.js): 'import { exportSPKI } from "jose"; const spki = await exportSPKI(key)'. The PEM should start with '-----BEGIN PUBLIC KEY-----'.

What do JWT standard claims mean (iss, sub, aud, exp, iat, nbf, jti)?▼

These are defined in RFC 7519: 'iss' (issuer) identifies who created the token; 'sub' (subject) identifies who the token is about; 'aud' (audience) specifies the intended recipient; 'exp' (expiration) is a Unix timestamp after which the token must be rejected; 'iat' (issued at) is when the token was created; 'nbf' (not before) means the token cannot be used before this time; 'jti' (JWT ID) is a unique identifier to prevent replay attacks. All timestamps are in Unix epoch seconds, not milliseconds.

What is the difference between JWK and PEM, and how do I convert between them?▼

PEM (Privacy Enhanced Mail) is a base64-encoded DER format — the format you see with '-----BEGIN PUBLIC KEY-----' headers. JWK (JSON Web Key) is a JSON representation of the same key material, used in JWKS endpoints for automatic key discovery. To convert JWK to PEM in Node.js: 'const { createPublicKey } = require("crypto"); const key = createPublicKey({ key: jwk, format: "jwk" }); const pem = key.export({ format: "pem", type: "spki" });'. The jose library also provides 'importJWK' and 'exportSPKI' helpers.

When should I use PS256 instead of RS256?▼

PS256 (RSA-PSS with SHA-256) uses probabilistic padding (PSS) instead of the deterministic PKCS#1 v1.5 padding used by RS256. PSS is cryptographically stronger and resistant to certain padding oracle attacks. The OpenID Connect specification recommends PS256 over RS256 for new implementations. If you have a choice and your platform supports it (all modern browsers and Node.js 12+ do via SubtleCrypto), prefer PS256 or ES256 over RS256. The key format is identical — the same RSA key pair works for both RS256 and PS256.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Related Articles

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →