Home > Tools > JWT Decoder

JWT Decoder & Debugger

Paste a JSON Web Token to decode its header, payload, and verify its signature. All processing is client-side — your tokens never leave your browser.

Presets:
Verify Signature:
Header
Payload

Security: All decoding happens in your browser. Your JWT is never sent to any server. For HMAC verification, enter the shared secret. For RSA, paste the public key in PEM format. The signature is verified using the browser's built-in Web Crypto API.

How to Use

Decode: Paste any JWT access token, ID token, or refresh token into the input field. The tool automatically splits it into the three parts (header.payload.signature), Base64-decodes each section, and displays the JSON.

Verify HS256/HS384/HS512: Enter the shared secret (the same key used to sign the token). The tool computes the expected HMAC and compares it to the token's signature.

Verify RS256/RS384/RS512: Paste the RSA public key in PEM format (-----BEGIN PUBLIC KEY-----). The tool verifies the signature using Web Crypto API.

Claims: Standard claims (iss, sub, aud, exp, iat, nbf, jti) are extracted into a table. Expired tokens (exp in the past) are highlighted in red.

Example Use Cases

JWT Structure and Security

JSON Web Token (JWT, RFC 7519) is a compact format for representing claims between parties. It is widely used for authentication, authorization, and information exchange in web APIs and mobile applications. A JWT consists of three parts separated by dots: header.payload.signature.

Token Parts

Header: A Base64URL-encoded JSON object specifying the signing algorithm (alg) and token type (typ). Common algorithms: HS256 (HMAC with SHA-256), RS256 (RSA PKCS#1 v1.5 with SHA-256), ES256 (ECDSA with P-256 and SHA-256), none (unsigned, for testing only). Payload: A Base64URL-encoded JSON object containing claims. Standard claims: iss (issuer), sub (subject), aud (audience), exp (expiration), nbf (not before), iat (issued at), jti (JWT ID). Private claims are application-specific. Signature: The Base64URL-encoded signature of the Base64URL-encoded header concatenated with a dot and the Base64URL-encoded payload.

Security Considerations

JWTs are not encrypted by default - anyone can read the payload by Base64URL-decoding. For confidentiality, use JWE (JSON Web Encryption). The signature only provides integrity and authenticity, not confidentiality. Common vulnerabilities: accepting "alg:none" tokens (bypassing signature verification), using symmetric keys in scenarios where the verifier should not have the signing key, and not validating the exp claim. For smart card applications, JWT can be used for secure session tokens with the card's signing key stored in hardware. Use our HMAC Generator to compute HMAC signatures and RSA Tool for RS256 signing.