Developer Utilities

Secure JWT Decoder

Paste your JSON Web Token below to inspect its claims. Decoding happens entirely in your browser—your tokens are never sent to a server.

100% Offline Parsing

Pasting production authentication tokens into web tools is risky. Our tool parses the Base64 payload strictly in local memory.

JSON Formatting

Automatically decodes and pretty-prints the Header and Payload claims so you can easily debug user roles and expirations.

No Logging

We respect your privacy. There are no backend databases or hidden API calls capturing the tokens you paste here.

Waiting for token...
Algorithm & Token Type

                    
Data & Claims

                    

Tokens are easily decoded. Secrets shouldn't be.

As you can see, a JSON Web Token is simply Base64 encoded. Anyone who intercepts it can read your payload. Do not put passwords or PII in a JWT.

If you need to securely deliver sensitive configuration files or API keys, use ZeroKey. We use true AES-GCM encryption to lock data locally, and permanently destroy the database record upon opening.

Encrypt a Secret Payload

Understanding the JWT Structure

A JSON Web Token (JWT) is an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between parties. A standard JWT consists of three parts separated by dots (.), looking like this: xxxxx.yyyyy.zzzzz

  • Header: The first part dictates the type of the token (JWT) and the signing algorithm being used, such as HMAC SHA256 or RSA.
  • Payload (Claims): The middle section contains the claims (statements about the user and additional metadata). Do not put secret information in the payload, as it is only encoded, not encrypted.
  • Signature: The final part is used to verify the message wasn't changed along the way. It is generated by signing the encoded header and payload with a secure private key.

How to decode a JWT payload in JavaScript

If you are building a frontend application and need to extract the user's ID or expiration date from a JWT stored in local storage, you don't need a heavy NPM library. You can decode it natively using the browser's built-in atob() function:

jwt-decoder.js
function parseJwtPayload(token) {
    // 1. Split the token and grab the payload (middle section)
    const base64Url = token.split('.')[1];
    
    // 2. Fix the Base64 formatting
    const base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');
    
    // 3. Decode the Base64 string into a JSON payload
    const jsonPayload = decodeURIComponent(window.atob(base64).split('').map(function(c) {
        return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
    }).join(''));

    // 4. Return the parsed object
    return JSON.parse(jsonPayload);
}

// Usage:
// const claims = parseJwtPayload(myToken);
// console.log(claims.exp);

Frequently Asked Questions

Is pasting my JWT online dangerous?
Yes. Standard online decoders send your token to their backend servers to be parsed. If you paste a production authentication token, you are effectively exposing a live session key to a third party. This ZeroKey Decoder protects you by running 100% offline in your browser memory, making zero network requests.
Can a JWT be decrypted or read by anyone?
Yes. A standard JSON Web Token is merely Base64 encoded, not encrypted. Anyone who gains access to the token string can decode it and read the payload claims. The signature attached to the token only proves authenticity (that the server issued it), it does not provide privacy.

Privacy First

We use essential cookies & analytics strictly to improve our free tools. No PII or cryptography secrets are ever tracked.

Policy