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.
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.
Related Products
on GumroadDeveloper Productivity Bundle
Stop rebuilding the same setup every project. 51 VSCode snippets, 40 Git aliases, 5 Docker Compose stacks, 5 GitHub Actions workflows, 5 README templates, and a dotfiles kit. Set up a professional dev environment in under an hour.
Buy on Gumroad →AI Prompt Engineering Toolkit
58 structured prompt templates for Claude, ChatGPT, and Gemini — organized by use case. Code Review, Debugging, Documentation, Architecture, and 10 model-specific tips. Stop writing prompts from scratch.
Buy on Gumroad →Developer Cheat Sheet Bundle
10 print-ready cheat sheets for the tools developers use every day: Git, Docker, Linux CLI, SQL, Regex, HTTP Status codes, VS Code shortcuts, Bash scripting, jq/JSON, and Markdown.
Buy on Gumroad →You Might Also Need
JWT Decoder
Free JWT decoder. Inspect any JSON Web Token
Open free tool →
JWT Builder
Build and generate JWT tokens online. Create HS256 JWTs with custom header, payload claims, and secret key. Color-coded output. Free tool for testing and learning.
Open free tool →
RSA Key Pair Generator
Generate RSA key pairs (2048-bit or 4096-bit) directly in your browser. Export public and private keys in PEM format (SPKI + PKCS#8). Uses Web Crypto API. No data sent to any server.
Open free tool →
More Free Tools
Related Articles
Authentication Security Tools 2026: Modern Auth Patterns, MFA, Passwordless, and OAuth2
Complete guide to authentication security tools in 2026. Covers Auth0, Clerk, NextAuth.js v5, JWT security, Passkeys/WebAuthn, TOTP authenticator apps, OAuth2/OIDC, session management, and building secure auth systems with Node.js and Python.
JWT Authentication Best Practices 2026: Secure Your API Tokens
Complete JWT security guide for 2026. Covers RS256 vs HS256 signing, token storage strategies, expiry and refresh token patterns, revocation, common vulnerabilities, and a production security checklist.
Web Authentication Deep Dive: OAuth 2.0 vs JWT vs Sessions in 2026
A comprehensive technical guide comparing OAuth 2.0, JWT, and session-based authentication. Learn how each works, when to use which, and how to implement secure web authentication in 2026.
Web Authentication Deep Dive: OAuth 2.0 vs JWT vs Sessions
A technical comparison of OAuth 2.0 flows, JWT structure and security, and session-based authentication. Learn when to use each approach, security tradeoffs, and implementation examples for modern web apps.
Web Authentication Patterns in 2026: OAuth, Passkeys, and JWT Best Practices
A complete guide to modern web authentication: OAuth 2.0/OIDC, Passkeys/WebAuthn, JWT best practices, session management, and MFA strategies for secure apps.
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$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.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →