base64decode

JWT Decoder

Paste a JSON Web Token to read its header and payload as formatted JSON. This JWT decoder runs in your browser and does not verify or store the token.

0 characters
Decoded outputWaiting for input

      
    

Decoding runs entirely in your browser. Nothing you paste is uploaded.

What is inside a JWT

A JSON Web Token is three Base64URL strings joined by dots: header.payload.signature. Paste the whole token into the decoder above and it splits them for you.

Because the header and payload are JSON, both parts almost always begin with eyJ, which is how {" looks in Base64. If you see a long string that starts with eyJ and contains two dots, it is a JWT.

Common JWT payload claims

Claim Meaning Example
sub Subject: the user or service the token is about "user_42"
iss Issuer: who created the token "https://auth.example.com"
aud Audience: who the token is meant for "api.example.com"
exp Expires at, in seconds since 1970 (Unix time) 1767225600
iat Issued at, also Unix time 1767222000
nbf Not valid before this Unix time 1767222000

The time claims are plain numbers of seconds, not dates. To read one, convert it from Unix time: 1767225600 is January 1, 2026, 00:00 UTC. A token whose exp is in the past has expired, and servers should reject it.

Decoding is not verifying

This JWT decoder only reads the token. It does not check the signature, because that needs the secret or public key held by the server that issued it. Anyone can change a payload, re-encode it and paste it here, and it will decode just as cleanly.

So decoding is the right tool for debugging: seeing which user a token belongs to, why a request is denied, or whether a token has expired. It is never proof that a token is genuine. Your server must verify the signature with a proper JWT library before trusting any claim.

Is it safe to paste a JWT here?

The decoding happens in your browser, and the token is not sent anywhere. Even so, treat a live token like a password: anyone who has it can use it until it expires. Prefer tokens from a test environment, and never post real tokens in tickets or chat.

Why a JWT fails to decode

Only part of the token was copied. A JWT needs exactly two dots. If the decoder treats your input as plain Base64 instead of a JWT, check that nothing was cut off at either end.

It includes the "Bearer " prefix. Authorization headers look like Bearer eyJ.... Remove the word Bearer and the space before decoding.

The payload is not JSON. Some systems put encrypted data (JWE) in a token. A JWE has five parts instead of three, and its payload cannot be read without the key.

Decode a JWT in code

Each part is Base64URL without padding. In the browser:

const [h, p] = token.split(".");
const read = s => JSON.parse(atob(s.replace(/-/g, "+").replace(/_/g, "/")));
console.log(read(h), read(p));

For more on Base64URL in code, see Base64 decode in JavaScript and Base64 decode in Python. To decode any other Base64 string, use the Base64 decoder.

Last updated:

JWT decoder FAQ

Does this JWT decoder verify the signature?

No. It reads the header and payload only. Checking the signature needs the issuer's secret or public key, so it must be done on your server with a JWT library.

What does the exp claim mean?

exp is the expiry time in seconds since January 1, 1970 (Unix time). If that moment has passed, the token has expired and should be rejected.

Is a JWT encrypted?

Not by itself. The payload is only Base64URL encoded, so anyone holding the token can read it. Never put passwords or other secrets in a JWT payload.

Why do JWTs start with eyJ?

The header and payload are JSON, and every JSON object starts with {". Encoded in Base64, those two characters become eyJ.

Is my token sent to a server?

No. Decoding happens in your browser and the token is not uploaded. Still, a live token works like a password until it expires, so use test tokens when you can.