JWT Verifier & Decoder Online | HS256, RS256, ES256 Signature

Digital Signatures
100% client-side. Processed locally in your browser using the Web Crypto API. Nothing is sent to any server.
⚠️ Critical Security: JWT payload is NOT encrypted — it is only base64url-encoded. Never put sensitive data (passwords, secrets, PII) in a JWT. Use short expiration times (5-15 minutes) for access tokens. Always validate iss, aud, and exp claims on the server side. For encrypted tokens, use JWE.

How It Works

What Is JWT (JSON Web Token)?

JWT (JSON Web Token), defined in RFC 7519, is a compact, URL-safe token format for representing claims between parties. A JWT consists of three parts: a header (algorithm and token type), a payload (claims as JSON), and a signature (proving authenticity). The signature can use symmetric algorithms (HMAC with a shared secret) or asymmetric algorithms (RSA, ECDSA with public/private key pairs).

This tool has two modes: Sign creates a JWT from a payload JSON and your secret or private key; Parse & Verify splits the three base64url-encoded segments, decodes the header and payload as JSON, and verifies the signature. Supports HS256/384/512, RS256/384/512, PS256/384/512, and ES256/384/512. All operations run locally in your browser.

When to Use JWT

  • API authentication — JWT is the standard for stateless authentication in REST APIs and microservices
  • Single Sign-On (SSO) — OAuth 2.0 and OpenID Connect use JWT for identity tokens
  • Information exchange — Securely transmit claims between parties with signature verification
  • Mobile / IoT — Compact token format ideal for bandwidth-constrained environments
  • Session management — Replace server-side sessions with stateless JWT tokens
  • When NOT to use — For confidential data, use JWE (encrypted JWT) instead; JWT payload is only encoded, not encrypted

Algorithm Comparison

AlgorithmTypeKey SizeSignature SizeBest for
HS256/384/512Symmetric (HMAC)Shared secret32-64 bytesInternal APIs, simple auth
RS256/384/512Asymmetric (RSA)2048-4096 bit256-512 bytesLegacy compatibility
PS256/384/512Asymmetric (RSA-PSS)2048-4096 bit256-512 bytesModern RSA (recommended)
ES256/384/512Asymmetric (ECDSA)256-521 bit64-132 bytesMobile, IoT, JWT standard

Standards Compliance

  • RFC 7519 — JSON Web Token (JWT) specification
  • RFC 7515 — JSON Web Signature (JWS) — signature algorithms
  • RFC 7518 — JSON Web Algorithms (JWA) — HS, RS, PS, ES algorithms
  • OpenID Connect Core 1.0 — JWT used as ID Token for authentication
  • OAuth 2.0 — JWT used for access tokens and client authentication

Last updated:

Code Examples

Create and verify JWT in multiple languages:

JavaScript — jose library (Browser / Node.js)

import { SignJWT, jwtVerify } from 'jose';

// Sign with HS256
const secret = new TextEncoder().encode('your-256-bit-secret');
const jwt = await new SignJWT({ sub: '1234567890', name: 'John Doe' })
  .setProtectedHeader({ alg: 'HS256' })
  .setIssuedAt()
  .setExpirationTime('2h')
  .sign(secret);
console.log('JWT:', jwt);

// Verify
const { payload } = await jwtVerify(jwt, secret);
console.log('Verified payload:', payload);

Python — PyJWT

import jwt

secret = 'your-256-bit-secret'

# Sign
payload = {'sub': '1234567890', 'name': 'John Doe'}
token = jwt.encode(payload, secret, algorithm='HS256')
print('JWT:', token)

# Verify
decoded = jwt.decode(token, secret, algorithms=['HS256'])
print('Decoded:', decoded)

Go — golang-jwt

import "github.com/golang-jwt/jwt/v5"

claims := jwt.MapClaims{
    "sub":  "1234567890",
    "name": "John Doe",
    "exp":  jwt.NewNumericDate(time.Now().Add(2 * time.Hour)),
}
token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims)
signed, _ := token.SignedString([]byte("your-256-bit-secret"))

Rust — jsonwebtoken

use jsonwebtoken::{encode, decode, Header, EncodingKey, DecodingKey, Validation};
use serde::{Serialize, Deserialize};

#[derive(Serialize, Deserialize)]
struct Claims {
    sub: String,
    name: String,
    exp: usize,
}

let claims = Claims { sub: "1234567890".into(), name: "John Doe".into(), exp: 1234567890 };
let token = encode(&Header::default(), &claims, &EncodingKey::from_secret(b"secret"))?;

Node.js — jsonwebtoken (CommonJS)

const jwt = require('jsonwebtoken');

// Sign
const payload = { sub: '1234567890', name: 'John Doe' };
const secret = 'your-256-bit-secret';
const token = jwt.sign(payload, secret, { algorithm: 'HS256', expiresIn: '2h' });
console.log('JWT:', token);


// Verify
const decoded = jwt.verify(token, secret);
console.log('Decoded:', decoded);

Common Pitfalls

⚠️ JWT Payload Is NOT Encrypted: The payload is only base64url-encoded. Anyone with the token can read its contents. Never put passwords, secrets, or PII in a JWT. Use JWE for encrypted tokens.
⚠️ Not Validating Expiration: Always check the exp claim on the server side. Without expiration validation, tokens remain valid indefinitely, even after revocation.
⚠️ Algorithm Confusion Attacks: Never trust the alg header from the client. Always specify the expected algorithm on the server side to prevent "none" algorithm or RS256/HS256 confusion attacks.
⚠️ Using Weak HMAC Secrets: For HS256, the shared secret must be at least 256 bits (32 bytes). Short secrets are vulnerable to brute-force attacks.
⚠️ Not Validating Issuer and Audience: Always verify iss (issuer) and aud (audience) claims match your expected values. This prevents tokens from one service being used in another.

Security Notes

ℹ️ Use Short Expiration Times: Set exp to 5-15 minutes for access tokens. Use refresh tokens for longer sessions. This limits the window of exposure if a token is compromised.
ℹ️ Prefer Asymmetric Algorithms for Distributed Systems: ES256/PS256 allow public key verification without sharing the signing secret. The signer keeps the private key; verifiers only need the public key.
ℹ️ Claims Breakdown: This tool provides a human-readable table of all standard registered claims (iss, sub, aud, exp, nbf, iat, jti) per RFC 7519, with descriptions and validation status.
ℹ️ PS256 Over RS256: RSA-PSS (PS256) has a formal security proof and is preferred over PKCS#1 v1.5 (RS256) for new JWT implementations.

Disclaimer

This tool is provided for educational and development purposes. JWT security depends on proper implementation of validation, expiration, and key management — all of which are the user's responsibility. For production systems, use well-audited JWT libraries and follow RFC 7519 security considerations.

Further Reading

Related Concepts

Related Tools

Need to generate ECC keys for ES256? Try the ECC Key Generator. For RSA keys used with RS256/PS256, see the RSA Key Generator. You can also exchange shared secrets securely using the ECDH Key Exchange tool.

Frequently Asked Questions

How does JWT signature verification work?

Verification recomputes the signature from the header and payload using the specified algorithm and a key, then compares it to the provided signature. For HMAC, a shared secret is used. For RSA/ECDSA, a public key is used.

Is the payload encrypted?

No. JWT payload is base64url-encoded, not encrypted. Anyone who has the token can read its contents. The signature only guarantees authenticity and integrity, not confidentiality. Never put sensitive data in a JWT payload.

Can I create (sign) a JWT?

Yes. Switch to the Sign mode, edit the payload JSON, choose an algorithm (HS/RS/PS/ES family), and provide the shared secret or PKCS#8 private key. Signing happens entirely in your browser — your keys never leave your device.

What is the Claims Breakdown?

The Claims Breakdown is a human-readable table that shows each claim in the payload with its name, value, and description. Standard registered claims (iss, sub, aud, exp, nbf, iat, jti) are described per RFC 7519; custom claims are marked as such.

Which algorithm should I choose?

For symmetric signing (shared secret), use HS256/384/512. For asymmetric signing, PS256 is recommended over RS256 (probabilistic, more resistant to certain attacks). ES256 offers compact signatures ideal for mobile and IoT. Choose based on your security requirements and key infrastructure.

Privacy: This tool runs entirely in your browser — nothing is uploaded or stored. · Disclaimer: For educational purposes only. Not professional security advice.

More in Signatures

Learn More