1. Anatomy of a Signed JWT
Every compact JWT has three Base64URL-encoded segments separated by dots: header.payload.signature. The signature covers the exact ASCII string base64url(header) + "." + base64url(payload).
THE TOOLBOX / SECURITY & AUTHENTICATION
Generate, sign, and verify real RFC 7519 JSON Web Tokens using your browser's native Web Crypto API—supporting HMAC (HS256/384/512), RSA (RS256), and ECDSA (ES256) with zero server calls.
JWT SIGNING ALGORITHMS & RFC 7519 GUIDE
| Algorithm | Key Type | Signature Size | Best Use Case |
|---|---|---|---|
| HS256 / HS512 | Symmetric (Shared Secret) | 32 / 64 bytes | Single-service backends or internal microservices sharing one vault. |
| RS256 | Asymmetric (RSA-2048) | 256 bytes | OAuth2 / OIDC identity providers publishing public JWKS endpoints. |
| ES256 | Asymmetric (ECDSA P-256) | 64 bytes | Modern high-throughput APIs needing compact asymmetric signatures. |
Every compact JWT has three Base64URL-encoded segments separated by dots: header.payload.signature. The signature covers the exact ASCII string base64url(header) + "." + base64url(payload).
On your backend, explicitly whitelist the expected algorithm (e.g. ['RS256']) when verifying tokens to prevent alg: "none" and key-confusion attacks.
Keep stateless JWT access tokens short-lived (15 minutes to 1 hour via exp) and pair them with revocable refresh tokens stored in HttpOnly cookies.
Generate SSH keys in our SSH Key Generator, inspect SSO assertions in the SAML Decoder, or test 2FA codes in the TOTP Generator.
All HMAC, RSA-2048, and ECDSA P-256 key generation, signing, and verification run 100% locally in your browser using the native Web Crypto API—nothing is ever sent over the network. Still, as a security best practice, use dedicated test keys when debugging.
HS256 uses a shared symmetric secret (the same key signs and verifies). RS256 (RSA 2048-bit) and ES256 (ECDSA P-256) use asymmetric keypairs—a private key signs the token while any service can verify it using the public key without being able to forge tokens. ES256 produces much smaller signatures than RS256.
No. Standard JWS tokens (JSON Web Signatures) are only Base64URL-encoded and cryptographically signed to prevent tampering—anyone holding the token can decode the header and payload. Never put passwords or sensitive secrets inside a JWT payload.
These are standard RFC 7519 registered claims: sub (Subject / user ID), iss (Issuer), aud (Audience), iat (Issued At Unix timestamp in seconds), and exp (Expiration Unix timestamp in seconds).
RFC 7518 requires an HS256 secret to be at least 256 bits (32 random bytes). Use the "Random 256-bit Secret" button to generate a cryptographically strong key via crypto.getRandomValues.
Yes. Switch to the "Decode & Verify JWT" tab, paste your token, and enter your HMAC secret (for HS256/HS384/HS512) or SPKI Public Key PEM (for RS256/ES256) to verify the signature locally.