| Algorithm | Type | Key | Strength | Best for |
|---|---|---|---|---|
| HS256 | Symmetric HMAC | Shared secret | 128-bit | Server-to-server, internal APIs |
| HS384 | Symmetric HMAC | Shared secret | 192-bit | Higher-assurance internal tokens |
| HS512 | Symmetric HMAC | Shared secret | 256-bit | Longest HMAC — overkill for most uses |
| RS256 | Asymmetric RSA | Private + Public | 2048-bit key | Public key distribution (OAuth 2, OIDC) |
| RS384 | Asymmetric RSA | Private + Public | 2048-bit key | Legacy compliance |
| RS512 | Asymmetric RSA | Private + Public | 2048-bit key | High-security public-key scenarios |
| ES256 | Asymmetric ECDSA | EC P-256 key pair | 128-bit equiv. | Mobile apps, shorter tokens |
| ES384 | Asymmetric ECDSA | EC P-384 key pair | 192-bit equiv. | Financial services, high-security APIs |
| none | Unsecured | None | ⚠️ No security | Testing only — never in production |
- HS256 — default for server-side APIs where you control all parties
- RS256 — use when third parties need to verify tokens without the signing secret (e.g. OIDC)
- ES256 — same as RS256 but smaller signatures; prefer for mobile/IoT bandwidth
- HS384/HS512 — rarely needed; SHA-256 collision resistance is sufficient for JWTs
Understanding Authentication Tokens
JSON Web Tokens (JWT) are lightweight, cryptographically signed tokens primarily used to authorize requests against modern REST APIs and microservices. Because the server can mathematically verify a JWT's signature locally, it rarely needs to query a database to authenticate a request.
SAML (Security Assertion Markup Language) is a robust, XML-based standard primarily used for Enterprise Single Sign-On (SSO) systems. It requires heavier back-and-forth parsing and is highly secure, but JWT's JSON format makes it significantly easier to transmit across HTTP headers in web and mobile applications.
The Authorization Code flow securely exchanges a temporary code for an Access Token (JWT).
graph TD
User([Resource Owner])
Client[Client App]
AuthServer[(Auth Server)]
API[(API Server)]
User -->|1. Clicks Login| Client
Client -->|2. Requests Auth Code| AuthServer
AuthServer -.->|3. Prompts for Consent| User
User -.->|4. Grants Consent| AuthServer
AuthServer -->|5. Returns Auth Code| Client
Client -->|6. Exchanges Code for Tokens| AuthServer
AuthServer -->|7. Returns Access Token JWT| Client
Client -->|8. API Call with Bearer JWT| API
API -->|9. Validates JWT & Returns Data| Client
JWT Token Structure
A JSON Web Token consists of three parts separated by dots, each Base64Url encoded.
graph LR
JWT[Encoded JWT Token]
Header[Header: Algorithm & Type]
Payload[Payload: Data & Claims]
Signature[Signature: Verification]
JWT -->|Part 1| Header
JWT -->|Part 2| Payload
JWT -->|Part 3| Signature
style Header fill:#df3852,stroke:#fff,stroke-width:2px,color:#fff
style Payload fill:#d72199,stroke:#fff,stroke-width:2px,color:#fff
style Signature fill:#4d7dff,stroke:#fff,stroke-width:2px,color:#fff
Frequently Asked Questions
Is it safe to paste a JWT here?
Decoding and signature verification run in your browser with the Web Crypto API and the open-source jose library, which is served from this site rather than a third-party CDN. Tokens, secrets and keys are not sent to our servers. The one network request you can trigger is fetching a JWKS URL that you enter. Treat real production tokens like passwords regardless: prefer test tokens or expired ones, and revoke any token you have shared.
What is the difference between decoding and verifying a JWT?
Decoding only Base64URL-decodes the header and payload, which anyone can do because they are not encrypted. Verifying recomputes or checks the signature with the right secret or public key, and then validates the claims (exp, nbf, iss, aud). A decoded token proves nothing about who issued it. Never trust claims from a token you have not verified.
Which JWT algorithms does the debugger support?
Any JWT can be decoded. Signature verification covers HS256/384/512, RS256/384/512, PS256/384/512 and ES256/384/512, using a shared secret, a PEM public key, a JWK or a JWKS URL (matched by kid). The Encoder signs with HS256/384/512, RS256 and ES256, or produces an unsecured alg none token for testing. EdDSA (Ed25519) is not supported.
Why do I get 'invalid signature' or 'token expired' errors?
For invalid signature, check that the secret or key matches the one that signed the token, that an HMAC secret is not Base64-encoded when the issuer used the raw string (or the reverse), that the algorithm matches, and that you are using the right key from the JWKS (the kid header). For expired tokens, the debugger shows exp, nbf and iat as times and a live countdown, and lets you set a clock-skew allowance, since a few seconds of drift between servers is a common cause.
What JWT security mistakes does the debugger warn about?
It warns about alg none tokens, HMAC tokens verified against a public key or JWKS (the algorithm-confusion attack), unrecognized algorithms, missing or far-future expiry and missing standard claims. The guidance follows RFC 8725, the JWT best current practice: pin the expected algorithm on the server instead of trusting the token header, validate iss, aud and exp, keep lifetimes short and never accept unsecured tokens.
Standards
JSON Web Token: RFC 7519. JSON Web Signature: RFC 7515. JSON Web Key and JWKS: RFC 7517. Best practices: RFC 8725. A JWT is signed, not encrypted, unless it is a JWE: anyone holding the token can read its claims.
JWT Structure
A JSON Web Token consists of three Base64URL-encoded parts separated by dots: Header.Payload.Signature. The header specifies the algorithm (e.g., HS256, RS256). The payload contains claims — registered (iss, sub, exp, iat), public, or private. The signature verifies the token hasn't been tampered with.
Decoding Process
Decoding is performed entirely in your browser using atob() with URL-safe Base64 substitutions. No data is sent to any server. The header and payload can always be decoded; signature verification requires the secret key.
Signature Verification
For HS256/HS384/HS512 (HMAC-based), the browser's Web Crypto API recomputes the signature using your provided secret. If it matches the token's signature, the token is valid and untampered. For RS256/RS384/RS512, an RSA public key is needed instead.
Common Claims
exp: expiration time (Unix timestamp). iat: issued-at time. nbf: not-before time. sub: subject (usually user ID). iss: issuer. aud: audience. This tool highlights expired tokens automatically.
Security Note
Never share JWTs containing sensitive data in public forums or logs. This debugger runs entirely client-side — your token and secret never leave your browser.
Personalised history, favourites & saved settings — coming soon for logged-in users